* [gentoo-commits] proj/portage:master commit in: repoman/pym/repoman/modules/scan/depend/
@ 2016-06-18 18:26 Zac Medico
0 siblings, 0 replies; 4+ messages in thread
From: Zac Medico @ 2016-06-18 18:26 UTC (permalink / raw
To: gentoo-commits
commit: 279b51a20dc180fb10252e5250236e04a248ea67
Author: Sergei Trofimovich <siarheit <AT> google <DOT> com>
AuthorDate: Sat Jun 18 17:01:09 2016 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Jun 18 18:26:05 2016 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=279b51a2
repoman: typo in docstring s/dependancy/dependency/
Signed-off-by: Sergei Trofimovich <siarheit <AT> google.com>
repoman/pym/repoman/modules/scan/depend/profile.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/repoman/pym/repoman/modules/scan/depend/profile.py b/repoman/pym/repoman/modules/scan/depend/profile.py
index a714a93..cf3d9a8 100644
--- a/repoman/pym/repoman/modules/scan/depend/profile.py
+++ b/repoman/pym/repoman/modules/scan/depend/profile.py
@@ -51,7 +51,7 @@ class ProfileDependsChecks(ScanBase):
self.repo_metadata = kwargs.get('repo_metadata')
def check(self, **kwargs):
- '''Perform profile dependant dependancy checks
+ '''Perform profile dependant dependency checks
@param arches:
@param pkg: Package in which we check (object).
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] proj/portage:master commit in: repoman/pym/repoman/modules/scan/depend/
@ 2016-08-14 18:48 Zac Medico
0 siblings, 0 replies; 4+ messages in thread
From: Zac Medico @ 2016-08-14 18:48 UTC (permalink / raw
To: gentoo-commits
commit: 99d8cdc0e9b011d39ae8537169ce2ca70a4e5f83
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 13 22:35:55 2016 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sun Aug 14 18:37:51 2016 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=99d8cdc0
repoman: fix erroneous LICENSE.syntax (bug 591184)
X-Gentoo-bug: 591184
X-Gentoo-bug-url: https://bugs.gentoo.org/show_bug.cgi?id=591184
Acked-by: Brian Dolbec <dolsen <AT> gentoo.org>
.../pym/repoman/modules/scan/depend/_depend_checks.py | 16 +++++++---------
1 file changed, 7 insertions(+), 9 deletions(-)
diff --git a/repoman/pym/repoman/modules/scan/depend/_depend_checks.py b/repoman/pym/repoman/modules/scan/depend/_depend_checks.py
index 3f6c93e..f0ae863 100644
--- a/repoman/pym/repoman/modules/scan/depend/_depend_checks.py
+++ b/repoman/pym/repoman/modules/scan/depend/_depend_checks.py
@@ -27,7 +27,7 @@ def check_slotop(depstr, is_valid_flag, badsyntax, mytype,
token_class=portage.dep.Atom)
except portage.exception.InvalidDependString as e:
my_dep_tree = None
- badsyntax.append(str(e))
+ badsyntax.append((mytype, str(e)))
def _traverse_tree(dep_tree, in_any_of):
# leaf
@@ -67,7 +67,7 @@ def _depend_checks(ebuild, pkg, portdb, qatracker, repo_metadata):
"java-pkg-opt-2" in ebuild.inherited,
inherited_wxwidgets_eclass = "wxwidgets" in ebuild.inherited
# operator_tokens = set(["||", "(", ")"])
- type_list, badsyntax = [], []
+ badsyntax = []
for mytype in Package._dep_keys + ("LICENSE", "PROPERTIES", "PROVIDE"):
mydepstr = ebuild.metadata[mytype]
@@ -83,7 +83,7 @@ def _depend_checks(ebuild, pkg, portdb, qatracker, repo_metadata):
is_valid_flag=pkg.iuse.is_valid_flag, token_class=token_class)
except portage.exception.InvalidDependString as e:
atoms = None
- badsyntax.append(str(e))
+ badsyntax.append((mytype, str(e)))
if atoms and mytype.endswith("DEPEND"):
if runtime and \
@@ -156,13 +156,11 @@ def _depend_checks(ebuild, pkg, portdb, qatracker, repo_metadata):
check_missingslot(atom, mytype, ebuild.eapi, portdb, qatracker,
ebuild.relative_path, ebuild.metadata)
- type_list.extend([mytype] * (len(badsyntax) - len(type_list)))
-
if runtime:
check_slotop(mydepstr, pkg.iuse.is_valid_flag,
badsyntax, mytype, qatracker, ebuild.relative_path)
- for m, b in zip(type_list, badsyntax):
+ for m, b in badsyntax:
if m.endswith("DEPEND"):
qacat = "dependency.syntax"
else:
@@ -171,9 +169,9 @@ def _depend_checks(ebuild, pkg, portdb, qatracker, repo_metadata):
qacat, "%s: %s: %s" % (ebuild.relative_path, m, b))
# data required for some other tests
- badlicsyntax = len([z for z in type_list if z == "LICENSE"])
- badprovsyntax = len([z for z in type_list if z == "PROVIDE"])
- baddepsyntax = len(type_list) != badlicsyntax + badprovsyntax
+ 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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] proj/portage:master commit in: repoman/pym/repoman/modules/scan/depend/
@ 2016-08-15 19:49 Zac Medico
0 siblings, 0 replies; 4+ messages in thread
From: Zac Medico @ 2016-08-15 19:49 UTC (permalink / raw
To: gentoo-commits
commit: f8ecea15c312ee9dcb28871811de9d68ef7b41b4
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Aug 15 19:35:47 2016 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Aug 15 19:36:38 2016 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=f8ecea15
repoman: deduplicate dependency.syntax errors (bug 591184)
X-Gentoo-bug: 591184
X-Gentoo-bug-url: https://bugs.gentoo.org/show_bug.cgi?id=591184
repoman/pym/repoman/modules/scan/depend/_depend_checks.py | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/repoman/pym/repoman/modules/scan/depend/_depend_checks.py b/repoman/pym/repoman/modules/scan/depend/_depend_checks.py
index f0ae863..807a918 100644
--- a/repoman/pym/repoman/modules/scan/depend/_depend_checks.py
+++ b/repoman/pym/repoman/modules/scan/depend/_depend_checks.py
@@ -1,5 +1,6 @@
# -*- coding:utf-8 -*-
+import collections
from _emerge.Package import Package
@@ -160,7 +161,12 @@ def _depend_checks(ebuild, pkg, portdb, qatracker, repo_metadata):
check_slotop(mydepstr, pkg.iuse.is_valid_flag,
badsyntax, mytype, qatracker, ebuild.relative_path)
+ dedup = collections.defaultdict(set)
for m, b in badsyntax:
+ if b in dedup[m]:
+ continue
+ dedup[m].add(b)
+
if m.endswith("DEPEND"):
qacat = "dependency.syntax"
else:
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] proj/portage:master commit in: repoman/pym/repoman/modules/scan/depend/
@ 2016-08-16 6:24 Zac Medico
0 siblings, 0 replies; 4+ messages in thread
From: Zac Medico @ 2016-08-16 6:24 UTC (permalink / raw
To: gentoo-commits
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)
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-08-16 6:24 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-18 18:26 [gentoo-commits] proj/portage:master commit in: repoman/pym/repoman/modules/scan/depend/ Zac Medico
-- strict thread matches above, loose matches on Subject: below --
2016-08-14 18:48 Zac Medico
2016-08-15 19:49 Zac Medico
2016-08-16 6:24 Zac Medico
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox