1 |
commit: dc6fbcd2f651e66195a5fe2ae7092bb53b06c5bc |
2 |
Author: Rick Farina (Zero_Chaos) <zerochaos <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Sep 23 17:37:34 2014 +0000 |
4 |
Commit: Richard Farina <zerochaos <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Sep 23 17:37:34 2014 +0000 |
6 |
URL: http://sources.gentoo.org/gitweb/?p=proj/qa-scripts.git;a=commit;h=dc6fbcd2 |
7 |
|
8 |
add explicit dep check |
9 |
|
10 |
previously we were checking only rdeps, but this was confusing since |
11 |
sometimes rdeps are missing, sometimes deps are missing, and sometimes |
12 |
both are missing. Explicit is best, so let's call things what they are. |
13 |
If the user wants less output, they could always fix their ebuilds. |
14 |
|
15 |
--- |
16 |
depcheck | 50 ++++++++++++++++++++++++++++++-------------------- |
17 |
1 file changed, 30 insertions(+), 20 deletions(-) |
18 |
|
19 |
diff --git a/depcheck b/depcheck |
20 |
index e521c66..dae0cd9 100755 |
21 |
--- a/depcheck |
22 |
+++ b/depcheck |
23 |
@@ -53,6 +53,28 @@ remove_atom_version() { |
24 |
echo $atom |
25 |
} |
26 |
|
27 |
+virtualcheck() { |
28 |
+ debug Checking if ${libowner_pn} is provided by a virtual |
29 |
+ for virtual in $(qdepends --nocolor --name-only --${1} --query ${libowner_pn} | grep ^virtual/) |
30 |
+ do |
31 |
+ debug Checking if ${virtual} is in dependencies |
32 |
+ local isvirtualdep=$(qdepends --${1} ${atom} | grep ${virtual}) |
33 |
+ |
34 |
+ if [ $? -eq 0 ]; then |
35 |
+ used_virtuals+=( ${virtual} ) |
36 |
+ continue 2 |
37 |
+ fi |
38 |
+ done |
39 |
+ |
40 |
+ if [ "${1}" = "depend" ]; then |
41 |
+ eerror "${obj} links to ${link}" |
42 |
+ fi |
43 |
+ eindent |
44 |
+ eerror Missing ${1^^} on $(bold ${libowner_pn}) |
45 |
+ eoutdent |
46 |
+ errors=1 |
47 |
+} |
48 |
+ |
49 |
check_atom() { |
50 |
|
51 |
local errors=0 |
52 |
@@ -143,30 +165,18 @@ check_atom() { |
53 |
fi |
54 |
done |
55 |
|
56 |
- debug "Checking if ${libowner_pn} is in the RDEPEND list of ${atom}" |
57 |
+ debug "Checking if ${libowner_pn} is in the [R]DEPEND list of ${atom}" |
58 |
|
59 |
local isdep |
60 |
- isdep=`qdepends -r ${atom} | grep ${libowner_pn}` |
61 |
- |
62 |
+ isdep=`qdepends -d ${atom} | grep ${libowner_pn}` |
63 |
if [ $? -ne 0 ]; then |
64 |
+ virtualcheck depend |
65 |
+ fi |
66 |
|
67 |
- debug Checking if ${libowner_pn} is provided by a virtual |
68 |
- for virtual in $(qdepends --nocolor --name-only --rdepend --query ${libowner_pn} | grep ^virtual/) |
69 |
- do |
70 |
- debug Checking if ${virtual} is in dependencies |
71 |
- local isvirtualdep=$(qdepends -r ${atom} | grep ${virtual}) |
72 |
- |
73 |
- if [ $? -eq 0 ]; then |
74 |
- used_virtuals+=( ${virtual} ) |
75 |
- continue 2 |
76 |
- fi |
77 |
- done |
78 |
- |
79 |
- eerror "${obj} links to ${link}" |
80 |
- eindent |
81 |
- eerror Missing RDEPEND on $(bold ${libowner_pn}) |
82 |
- eoutdent |
83 |
- errors=1 |
84 |
+ local isrdep |
85 |
+ isrdep=`qdepends -r ${atom} | grep ${libowner_pn}` |
86 |
+ if [ $? -ne 0 ]; then |
87 |
+ virtualcheck rdepend |
88 |
fi |