summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-11-23 03:13:43 +0000
committerZac Medico <zmedico@gentoo.org>2006-11-23 03:13:43 +0000
commitf14499852651ac81041f4eef4466a9438a5e71ec (patch)
treee662a83fa2713e08457db7caf0449fe1fea104db /pym
parent328ee333bd985079c4bffad2119540596f808147 (diff)
downloadportage-f14499852651ac81041f4eef4466a9438a5e71ec.tar.gz
portage-f14499852651ac81041f4eef4466a9438a5e71ec.tar.bz2
portage-f14499852651ac81041f4eef4466a9438a5e71ec.zip
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
Diffstat (limited to 'pym')
-rw-r--r--pym/portage.py29
1 files changed, 26 insertions, 3 deletions
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