aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Palimaka <kensington@gentoo.org>2014-10-28 13:12:27 -0400
committerRick Farina (Zero_Chaos) <zerochaos@gentoo.org>2014-10-28 13:12:27 -0400
commite811a9d7c4e31dbbff9eabb0d76ebb8d700d09e6 (patch)
tree37d54527bdb54ee70324961cf216da51c20a1bfa
parentdepcheck: resolve an issue where missing RDEPEND is not reported. (diff)
downloadqa-scripts-e811a9d7c4e31dbbff9eabb0d76ebb8d700d09e6.tar.gz
qa-scripts-e811a9d7c4e31dbbff9eabb0d76ebb8d700d09e6.tar.bz2
qa-scripts-e811a9d7c4e31dbbff9eabb0d76ebb8d700d09e6.zip
dereference symlinks when needed
sometimes things like eselect manipulate symlinks that packages are linked to, we need to dereference those symlinks to find the real package to verify the deps
-rwxr-xr-xdepcheck10
1 files changed, 8 insertions, 2 deletions
diff --git a/depcheck b/depcheck
index 265615c..1f669f9 100755
--- a/depcheck
+++ b/depcheck
@@ -145,8 +145,14 @@ check_atom() {
local libowner=`qfile -vqC ${link} | uniq`
if [ ! "${libowner}" ]; then
- ewarn "Warning: installed file ${obj} is linked to ${link} which is not owned by any installed atom."
- continue
+ local dereferenced=`qfile -vqC $(readlink -f ${link}) | uniq`
+ if [ "${dereferenced}" ]; then
+ debug "Deferenced symlink and found real lib owner"
+ libowner=${dereferenced}
+ else
+ ewarn "Warning: installed file ${obj} is linked to ${link} which is not owned by any installed atom."
+ continue
+ fi
fi
debug "Owning package for ${link} is ${libowner}"