commit:     e811a9d7c4e31dbbff9eabb0d76ebb8d700d09e6
Author:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 28 17:12:27 2014 +0000
Commit:     Richard Farina <zerochaos <AT> gentoo <DOT> org>
CommitDate: Tue Oct 28 17:12:27 2014 +0000
URL:        
http://sources.gentoo.org/gitweb/?p=proj/qa-scripts.git;a=commit;h=e811a9d7

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

---
 depcheck | 10 ++++++++--
 1 file 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}"

Reply via email to