summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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