From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 4E26F13832E for ; Sun, 14 Aug 2016 15:18:26 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id AB51221C038; Sun, 14 Aug 2016 15:18:21 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 23CA721C012 for ; Sun, 14 Aug 2016 15:18:21 +0000 (UTC) Received: from professor-x (S010634bdfa9ecf80.vc.shawcable.net [96.49.31.57]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: dolsen) by smtp.gentoo.org (Postfix) with ESMTPSA id 74C1F340CCF for ; Sun, 14 Aug 2016 15:18:18 +0000 (UTC) Date: Sun, 14 Aug 2016 08:18:15 -0700 From: Brian Dolbec To: gentoo-portage-dev@lists.gentoo.org Subject: Re: [gentoo-portage-dev] [PATCH] repoman: fix erroneous LICENSE.syntax (bug 591184) Message-ID: <20160814081815.1cb2a5ab.dolsen@gentoo.org> In-Reply-To: <1471129259-17165-1-git-send-email-zmedico@gentoo.org> References: <1471129259-17165-1-git-send-email-zmedico@gentoo.org> Organization: Gentoo Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-portage-dev@lists.gentoo.org Reply-to: gentoo-portage-dev@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Archives-Salt: 32fd48db-9a12-406b-8e9e-0a16ee042c02 X-Archives-Hash: 462be4aef901aa897f6f50da790f8b7a On Sat, 13 Aug 2016 16:00:59 -0700 Zac Medico wrote: > 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 > looks good, thanks for the fast fix Zac. -- Brian Dolbec