summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-11-03 17:13:18 +0000
committerZac Medico <zmedico@gentoo.org>2007-11-03 17:13:18 +0000
commit53450656af965d040e399d4a29c330a6e6b85a3f (patch)
treee2946a62dabd1be2d1e912453509493d7a65dc55
parent25ccd8c729db238a5020c3f97082252ec4973fa9 (diff)
downloadportage-53450656af965d040e399d4a29c330a6e6b85a3f.tar.gz
portage-53450656af965d040e399d4a29c330a6e6b85a3f.tar.bz2
portage-53450656af965d040e399d4a29c330a6e6b85a3f.zip
Revert to backward compatible masking behavior with respect
to -* in KEYWORDS and package.keywords since -* behavior changes are not essential at this time and a change in this long standing behavior has potential to confuse lots of users. svn path=/main/branches/2.1.2/; revision=8395
-rw-r--r--pym/portage.py25
1 files changed, 9 insertions, 16 deletions
diff --git a/pym/portage.py b/pym/portage.py
index fbb42d8cf..f120ba834 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -1953,18 +1953,17 @@ class config:
# matches ACCEPT_KEYWORDS behavior
inc_pgroups = set()
for x in pgroups:
- if x == "-*":
- inc_pgroups.clear()
- elif x.startswith("-"):
+ # The -* special case should be removed once the tree
+ # is clean of KEYWORDS=-* crap
+ if x != "-*" and x.startswith("-"):
inc_pgroups.discard(x[1:])
- elif x not in inc_pgroups:
- inc_pgroups.add(x)
+ inc_pgroups.add(x)
pgroups = inc_pgroups
del inc_pgroups
hasstable = False
hastesting = False
for gp in mygroups:
- if gp == "*" or (gp == "-*" and len(mygroups) == 1):
+ if gp == "*":
writemsg(("--- WARNING: Package '%s' uses" + \
" '%s' keyword.\n") % (cpv, gp), noiselevel=-1)
if gp == "*":
@@ -5181,17 +5180,11 @@ def getmaskingstatus(mycpv, settings=None, portdb=None):
for match in matches:
pgroups.extend(pkgdict[cp][match])
if matches:
- inc_pgroups = []
+ inc_pgroups = set()
for x in pgroups:
- if x == "-*":
- inc_pgroups = []
- elif x[0] == "-":
- try:
- inc_pgroups.remove(x[1:])
- except ValueError:
- pass
- elif x not in inc_pgroups:
- inc_pgroups.append(x)
+ if x != "-*" and x.startswith("-"):
+ inc_pgroups.discard(x[1:])
+ inc_pgroups.add(x)
pgroups = inc_pgroups
del inc_pgroups