From f14499852651ac81041f4eef4466a9438a5e71ec Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Thu, 23 Nov 2006 03:13:43 +0000 Subject: For bug #150585, stack package.keywords incrementally so that -keyword works as expected for any incremental variable. This brings the gvisible and getmaskingstatus logic into sync so that the confusing (masked by: ) message will not be generated in cases where package.keywords contains -keyword followed by keyword. svn path=/main/trunk/; revision=5121 --- pym/portage.py | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) (limited to 'pym') diff --git a/pym/portage.py b/pym/portage.py index 5422e653a..cebf64761 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -4082,6 +4082,19 @@ def getmaskingstatus(mycpv, settings=None, portdb=None): matches = match_to_list(mycpv, pkgdict[cp].keys()) for match in matches: pgroups.extend(pkgdict[cp][match]) + if matches: + inc_pgroups = [] + for x in pgroups: + if x != "-*" and x.startswith("-"): + try: + inc_pgroups.remove(x[1:]) + except ValueError: + pass + continue + if x not in inc_pgroups: + inc_pgroups.append(x) + pgroups = inc_pgroups + del inc_pgroups kmask = "missing" @@ -5583,6 +5596,19 @@ class portdbapi(dbapi): matches = match_to_list(mycpv, pkgdict[cp].keys()) for atom in matches: pgroups.extend(pkgdict[cp][atom]) + if matches: + inc_pgroups = [] + for x in pgroups: + if x != "-*" and x.startswith("-"): + try: + inc_pgroups.remove(x[1:]) + except ValueError: + pass + continue + if x not in inc_pgroups: + inc_pgroups.append(x) + pgroups = inc_pgroups + del inc_pgroups hasstable = False hastesting = False for gp in mygroups: @@ -5591,9 +5617,6 @@ class portdbapi(dbapi): noiselevel=-1) match=1 break - elif "-"+gp in pgroups: - match=0 - break elif gp in pgroups: match=1 break -- cgit v1.2.3-1-g7c22