commit:     62961bdcb071b6e00418aabbbbfcb4601196ea42
Author:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
AuthorDate: Wed Sep 24 17:27:42 2014 +0000
Commit:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
CommitDate: Wed Sep 24 17:27:42 2014 +0000
URL:        
http://sources.gentoo.org/gitweb/?p=proj/qa-scripts.git;a=commit;h=62961bdc

depcheck: resolve an issue where missing RDEPEND is not reported.

---
 depcheck | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/depcheck b/depcheck
index 93abeb1..265615c 100755
--- a/depcheck
+++ b/depcheck
@@ -55,7 +55,7 @@ remove_atom_version() {
 
 virtualcheck() {
        debug Checking if ${libowner_pn} is provided by a virtual
-       for virtual in $(qdepends --nocolor --name-only --${1} --query 
${libowner_pn} | grep ^virtual/)
+       for virtual in $(qdepends --nocolor --name-only --rdepend --query 
${libowner_pn} | grep ^virtual/)
        do
                debug Checking if ${virtual} is in dependencies
                local isvirtualdep
@@ -63,16 +63,20 @@ virtualcheck() {
 
                if [ $? -eq 0 ]; then
                        used_virtuals+=( ${virtual} )
-                       continue 2
+                       local resolved=true
+                       break
                fi
        done
 
-       if [ "${1}" = "depend" ]; then
-               eerror "${obj} links to ${link}"
+       if [[ ! ${resolved} ]]; then
+               if [ "${1}" = "depend" ]; then
+                       eerror "${obj} links to ${link}"
+               fi
+               eindent
+               eerror Missing ${1^^} on $(bold ${libowner_pn})
+               eoutdent
        fi
-       eindent
-       eerror Missing ${1^^} on $(bold ${libowner_pn})
-       eoutdent
+
        errors=1
 }
 

Reply via email to