public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Zac Medico <zmedico@gentoo.org>
To: gentoo-portage-dev@lists.gentoo.org
Cc: Zac Medico <zmedico@gentoo.org>
Subject: [gentoo-portage-dev] [PATCH] repoman: fix erroneous LICENSE.syntax (bug 591184)
Date: Sat, 13 Aug 2016 16:00:59 -0700	[thread overview]
Message-ID: <1471129259-17165-1-git-send-email-zmedico@gentoo.org> (raw)

X-Gentoo-bug: 591184
X-Gentoo-bug-url: https://bugs.gentoo.org/show_bug.cgi?id=591184
---
 .../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
 
-- 
2.7.4



             reply	other threads:[~2016-08-13 23:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-13 23:00 Zac Medico [this message]
2016-08-14 15:18 ` [gentoo-portage-dev] [PATCH] repoman: fix erroneous LICENSE.syntax (bug 591184) Brian Dolbec
2016-08-14 18:53   ` 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=1471129259-17165-1-git-send-email-zmedico@gentoo.org \
    --to=zmedico@gentoo.org \
    --cc=gentoo-portage-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