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