1 |
X-Gentoo-bug: 591184 |
2 |
X-Gentoo-bug-url: https://bugs.gentoo.org/show_bug.cgi?id=591184 |
3 |
--- |
4 |
.../pym/repoman/modules/scan/depend/_depend_checks.py | 16 +++++++--------- |
5 |
1 file changed, 7 insertions(+), 9 deletions(-) |
6 |
|
7 |
diff --git a/repoman/pym/repoman/modules/scan/depend/_depend_checks.py b/repoman/pym/repoman/modules/scan/depend/_depend_checks.py |
8 |
index 3f6c93e..f0ae863 100644 |
9 |
--- a/repoman/pym/repoman/modules/scan/depend/_depend_checks.py |
10 |
+++ b/repoman/pym/repoman/modules/scan/depend/_depend_checks.py |
11 |
@@ -27,7 +27,7 @@ def check_slotop(depstr, is_valid_flag, badsyntax, mytype, |
12 |
token_class=portage.dep.Atom) |
13 |
except portage.exception.InvalidDependString as e: |
14 |
my_dep_tree = None |
15 |
- badsyntax.append(str(e)) |
16 |
+ badsyntax.append((mytype, str(e))) |
17 |
|
18 |
def _traverse_tree(dep_tree, in_any_of): |
19 |
# leaf |
20 |
@@ -67,7 +67,7 @@ def _depend_checks(ebuild, pkg, portdb, qatracker, repo_metadata): |
21 |
"java-pkg-opt-2" in ebuild.inherited, |
22 |
inherited_wxwidgets_eclass = "wxwidgets" in ebuild.inherited |
23 |
# operator_tokens = set(["||", "(", ")"]) |
24 |
- type_list, badsyntax = [], [] |
25 |
+ badsyntax = [] |
26 |
for mytype in Package._dep_keys + ("LICENSE", "PROPERTIES", "PROVIDE"): |
27 |
mydepstr = ebuild.metadata[mytype] |
28 |
|
29 |
@@ -83,7 +83,7 @@ def _depend_checks(ebuild, pkg, portdb, qatracker, repo_metadata): |
30 |
is_valid_flag=pkg.iuse.is_valid_flag, token_class=token_class) |
31 |
except portage.exception.InvalidDependString as e: |
32 |
atoms = None |
33 |
- badsyntax.append(str(e)) |
34 |
+ badsyntax.append((mytype, str(e))) |
35 |
|
36 |
if atoms and mytype.endswith("DEPEND"): |
37 |
if runtime and \ |
38 |
@@ -156,13 +156,11 @@ def _depend_checks(ebuild, pkg, portdb, qatracker, repo_metadata): |
39 |
check_missingslot(atom, mytype, ebuild.eapi, portdb, qatracker, |
40 |
ebuild.relative_path, ebuild.metadata) |
41 |
|
42 |
- type_list.extend([mytype] * (len(badsyntax) - len(type_list))) |
43 |
- |
44 |
if runtime: |
45 |
check_slotop(mydepstr, pkg.iuse.is_valid_flag, |
46 |
badsyntax, mytype, qatracker, ebuild.relative_path) |
47 |
|
48 |
- for m, b in zip(type_list, badsyntax): |
49 |
+ for m, b in badsyntax: |
50 |
if m.endswith("DEPEND"): |
51 |
qacat = "dependency.syntax" |
52 |
else: |
53 |
@@ -171,9 +169,9 @@ def _depend_checks(ebuild, pkg, portdb, qatracker, repo_metadata): |
54 |
qacat, "%s: %s: %s" % (ebuild.relative_path, m, b)) |
55 |
|
56 |
# data required for some other tests |
57 |
- badlicsyntax = len([z for z in type_list if z == "LICENSE"]) |
58 |
- badprovsyntax = len([z for z in type_list if z == "PROVIDE"]) |
59 |
- baddepsyntax = len(type_list) != badlicsyntax + badprovsyntax |
60 |
+ badlicsyntax = len([z for z in badsyntax if z[0] == "LICENSE"]) |
61 |
+ badprovsyntax = len([z for z in badsyntax if z[0] == "PROVIDE"]) |
62 |
+ baddepsyntax = len(badsyntax) != badlicsyntax + badprovsyntax |
63 |
badlicsyntax = badlicsyntax > 0 |
64 |
#badprovsyntax = badprovsyntax > 0 |
65 |
|
66 |
-- |
67 |
2.7.4 |