diff options
| author | idl0r <idl0r@gentoo.org> | 2009-12-10 21:37:38 +0000 |
|---|---|---|
| committer | idl0r <idl0r@gentoo.org> | 2009-12-10 21:37:38 +0000 |
| commit | 16da0963b0ebd16638cb39209435d9b894553a29 (patch) | |
| tree | 3a17c3fc7333d648dbc51ec785d9f96c211e339e /bin/revdep-rebuild | |
| parent | 7a63d307efed6c3545abc55c31918410c0a2077c (diff) | |
| download | gentoolkit-16da0963b0ebd16638cb39209435d9b894553a29.tar.gz | |
Workaround for bug 280341.
Use maxcount option for grep when looking for file owner.
svn path=/trunk/gentoolkit/; revision=717
Diffstat (limited to 'bin/revdep-rebuild')
| -rwxr-xr-x | bin/revdep-rebuild | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/bin/revdep-rebuild b/bin/revdep-rebuild index aa96667..d32e4e1 100755 --- a/bin/revdep-rebuild +++ b/bin/revdep-rebuild @@ -263,16 +263,20 @@ clean_exit() { # NOTE: depends on app-misc/realpath! get_file_owner() { local IFS=$'\n' - # 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 -e "${*} " -e "${rpath} " | + # Workaround for bug 280341 + mlib=$(echo ${*}|sed 's:/lib/:/lib64/:') + [[ "${*}" == "${mlib}" ]] && mlib=$(echo ${*}|sed 's:/lib64/:/lib/:') + + # 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} ". + find /var/db/pkg -type f -name CONTENTS -print0 | + xargs -0 grep -m 1 -Fl -e "${*} " -e "${rpath} " -e "${mlib} " | sed 's:/var/db/pkg/\(.*\)/CONTENTS:\1:' } ## |
