commit: dc6fbcd2f651e66195a5fe2ae7092bb53b06c5bc
Author: Rick Farina (Zero_Chaos) <zerochaos <AT> gentoo <DOT> org>
AuthorDate: Tue Sep 23 17:37:34 2014 +0000
Commit: Richard Farina <zerochaos <AT> gentoo <DOT> org>
CommitDate: Tue Sep 23 17:37:34 2014 +0000
URL:
http://sources.gentoo.org/gitweb/?p=proj/qa-scripts.git;a=commit;h=dc6fbcd2
add explicit dep check
previously we were checking only rdeps, but this was confusing since
sometimes rdeps are missing, sometimes deps are missing, and sometimes
both are missing. Explicit is best, so let's call things what they are.
If the user wants less output, they could always fix their ebuilds.
---
depcheck | 50 ++++++++++++++++++++++++++++++--------------------
1 file changed, 30 insertions(+), 20 deletions(-)
diff --git a/depcheck b/depcheck
index e521c66..dae0cd9 100755
--- a/depcheck
+++ b/depcheck
@@ -53,6 +53,28 @@ remove_atom_version() {
echo $atom
}
+virtualcheck() {
+ debug Checking if ${libowner_pn} is provided by a virtual
+ for virtual in $(qdepends --nocolor --name-only --${1} --query
${libowner_pn} | grep ^virtual/)
+ do
+ debug Checking if ${virtual} is in dependencies
+ local isvirtualdep=$(qdepends --${1} ${atom} | grep ${virtual})
+
+ if [ $? -eq 0 ]; then
+ used_virtuals+=( ${virtual} )
+ continue 2
+ fi
+ done
+
+ if [ "${1}" = "depend" ]; then
+ eerror "${obj} links to ${link}"
+ fi
+ eindent
+ eerror Missing ${1^^} on $(bold ${libowner_pn})
+ eoutdent
+ errors=1
+}
+
check_atom() {
local errors=0
@@ -143,30 +165,18 @@ check_atom() {
fi
done
- debug "Checking if ${libowner_pn} is in the RDEPEND
list of ${atom}"
+ debug "Checking if ${libowner_pn} is in the [R]DEPEND
list of ${atom}"
local isdep
- isdep=`qdepends -r ${atom} | grep ${libowner_pn}`
-
+ isdep=`qdepends -d ${atom} | grep ${libowner_pn}`
if [ $? -ne 0 ]; then
+ virtualcheck depend
+ fi
- 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
- used_virtuals+=( ${virtual} )
- continue 2
- fi
- done
-
- eerror "${obj} links to ${link}"
- eindent
- eerror Missing RDEPEND on $(bold ${libowner_pn})
- eoutdent
- errors=1
+ local isrdep
+ isrdep=`qdepends -r ${atom} | grep ${libowner_pn}`
+ if [ $? -ne 0 ]; then
+ virtualcheck rdepend
fi