commit:     d23d93380b5e9beccde37b016e4490a32de7db04
Author:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 28 03:19:40 2014 +0000
Commit:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
CommitDate: Thu Aug 28 03:19:40 2014 +0000
URL:        
http://sources.gentoo.org/gitweb/?p=proj/qa-scripts.git;a=commit;h=d23d9338

depcheck: add simple virtual resolution.

---
 depcheck | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/depcheck b/depcheck
index 39cd29c..549fe52 100755
--- a/depcheck
+++ b/depcheck
@@ -146,6 +146,18 @@ check_atom() {
                        isdep=`qdepends -r ${atom} | grep ${libowner_pn}`
 
                        if [ $? -ne 0 ]; then
+
+                               debug Checking if ${libowner_pn} is provided by 
a virtual
+                               for virtual in $(qdepends --nocolor --name-only 
--rdepend --query ${libowner_pn} | grep ^virtual/)
+                               do
+                                       debug Checking if ${virtual} is in 
dependencies
+                                       local isvirtualdep=$(qdepends -r 
${atom} | grep ${virtual})
+
+                                       if [ $? -eq 0 ]; then
+                                               continue 2
+                                       fi
+                               done
+
                                eerror "${obj} links to ${link}"
                                eindent
                                eerror Missing dependency on $(bold 
${libowner_pn})

Reply via email to