diff options
| author | idl0r <idl0r@gentoo.org> | 2009-10-28 20:48:11 +0000 |
|---|---|---|
| committer | idl0r <idl0r@gentoo.org> | 2009-10-28 20:48:11 +0000 |
| commit | afd74c21a75ef7350a66235910032ed5ce570bc9 (patch) | |
| tree | a5a8266f2a435dc06fa1cac35ef27c73dfe08961 | |
| parent | e4245be8b053765bdda7018d3c4d749821f1e20f (diff) | |
| download | gentoolkit-afd74c21a75ef7350a66235910032ed5ce570bc9.tar.gz | |
Use realpath in get_file_owner to be able to get the package containing e.g. /lib/libreadline.so.6 on amd64, fixes bug 280341.
svn path=/trunk/gentoolkit/; revision=696
| -rw-r--r-- | ChangeLog | 6 | ||||
| -rwxr-xr-x | bin/revdep-rebuild | 11 |
2 files changed, 14 insertions, 3 deletions
@@ -1,6 +1,10 @@ 2009-10-27: Christian Ruppert <idl0r@gentoo.org> + * revdep-rebuild: Use realpath in get_file_owner to be able to get the + package containing e.g. /lib/libreadline.so.6 on amd64, fixes bug 280341. + +2009-10-27: Christian Ruppert <idl0r@gentoo.org> * revdep-rebuild.1: Fix bug 281050, thanks to Jesús Guerrero - <i92guboj@gentoo.org>. + <i92guboj@gentoo.org>. 2009-10-26: Christian Ruppert <idl0r@gentoo.org> * euse: Don't add an additional new line at the end of file. diff --git a/bin/revdep-rebuild b/bin/revdep-rebuild index b44dadc..b6d4eed 100755 --- a/bin/revdep-rebuild +++ b/bin/revdep-rebuild @@ -252,12 +252,19 @@ clean_exit() { } ## # Get the name of the package that owns a file or list of files given as args. +# NOTE: depends on app-misc/realpath! get_file_owner() { local IFS=$'\n' - # ${*/%/ } adds a space to the end of each object name to prevent false + # Add a space to the end of each object name to prevent false # matches, for example /usr/bin/dia matching /usr/bin/dialog (bug #196460). + # The same for "${rpath} ". + + rpath=$(realpath "${*}" 2>/dev/null) + # To ensure we always have something in rpath... + [[ -z $rpath ]] && rpath=${*} + find -L /var/db/pkg -name CONTENTS -print0 | - xargs -0 grep -Fl "${*/%/ }" | + xargs -0 grep -Fl -e "${*} " -e "${rpath} " | sed 's:/var/db/pkg/\(.*\)/CONTENTS:\1:' } ## |
