commit: 2e5cfb1c12011dec3c212d1f77cb8911d5add172
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 16 05:58:01 2016 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Tue Aug 16 06:08:27 2016 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=2e5cfb1c
repoman: fix _depend_checks baddepsyntax accounting
Fix accounting for baddepsyntax so that it doesn't count invalid
PROPERTIES, since it's only intended to count invalid *DEPEND.
Also remove unused counts for invalid LICENSE and PROVIDE.
repoman/pym/repoman/modules/scan/depend/_depend_checks.py | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/repoman/pym/repoman/modules/scan/depend/_depend_checks.py
b/repoman/pym/repoman/modules/scan/depend/_depend_checks.py
index 807a918..11435f9 100644
--- a/repoman/pym/repoman/modules/scan/depend/_depend_checks.py
+++ b/repoman/pym/repoman/modules/scan/depend/_depend_checks.py
@@ -161,6 +161,7 @@ def _depend_checks(ebuild, pkg, portdb, qatracker,
repo_metadata):
check_slotop(mydepstr, pkg.iuse.is_valid_flag,
badsyntax, mytype, qatracker,
ebuild.relative_path)
+ baddepsyntax = False
dedup = collections.defaultdict(set)
for m, b in badsyntax:
if b in dedup[m]:
@@ -168,19 +169,13 @@ def _depend_checks(ebuild, pkg, portdb, qatracker,
repo_metadata):
dedup[m].add(b)
if m.endswith("DEPEND"):
+ baddepsyntax = True
qacat = "dependency.syntax"
else:
qacat = m + ".syntax"
qatracker.add_error(
qacat, "%s: %s: %s" % (ebuild.relative_path, m, b))
- # data required for some other tests
- badlicsyntax = len([z for z in badsyntax if z[0] == "LICENSE"])
- badprovsyntax = len([z for z in badsyntax if z[0] == "PROVIDE"])
- baddepsyntax = len(badsyntax) != badlicsyntax + badprovsyntax
- badlicsyntax = badlicsyntax > 0
- #badprovsyntax = badprovsyntax > 0
-
# Parse the LICENSE variable, remove USE conditions and flatten it.
licenses = portage.dep.use_reduce(
ebuild.metadata["LICENSE"], matchall=1, flat=True)