public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Zac Medico" <zmedico@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:master commit in: repoman/pym/repoman/modules/scan/depend/
Date: Sun, 14 Aug 2016 18:48:22 +0000 (UTC)	[thread overview]
Message-ID: <1471199871.99d8cdc0e9b011d39ae8537169ce2ca70a4e5f83.zmedico@gentoo> (raw)

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
 


             reply	other threads:[~2016-08-14 18:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-14 18:48 Zac Medico [this message]
  -- strict thread matches above, loose matches on Subject: below --
2016-08-16  6:24 [gentoo-commits] proj/portage:master commit in: repoman/pym/repoman/modules/scan/depend/ Zac Medico
2016-08-15 19:49 Zac Medico
2016-06-18 18:26 Zac Medico

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1471199871.99d8cdc0e9b011d39ae8537169ce2ca70a4e5f83.zmedico@gentoo \
    --to=zmedico@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox