summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarius Mauch <genone@gentoo.org>2007-06-23 19:36:30 +0000
committerMarius Mauch <genone@gentoo.org>2007-06-23 19:36:30 +0000
commit8fe1bab3fb14d0dbba976e4891974faca1e57b63 (patch)
treef91a5b961d1de5e2d88f76da982f366b52d1f041
parent53133b21b997330234b48147128d9a5b87a509a5 (diff)
downloadportage-8fe1bab3fb14d0dbba976e4891974faca1e57b63.tar.gz
portage-8fe1bab3fb14d0dbba976e4891974faca1e57b63.tar.bz2
portage-8fe1bab3fb14d0dbba976e4891974faca1e57b63.zip
get ACCEPT_KEYWORDS from the env in gvisible() to properly handle negated values (bug #139600)
svn path=/main/trunk/; revision=6981
-rw-r--r--pym/portage/dbapi/porttree.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/pym/portage/dbapi/porttree.py b/pym/portage/dbapi/porttree.py
index 524a36fa2..56c711d13 100644
--- a/pym/portage/dbapi/porttree.py
+++ b/pym/portage/dbapi/porttree.py
@@ -649,6 +649,12 @@ class portdbapi(dbapi):
accept_keywords = self.mysettings["ACCEPT_KEYWORDS"].split()
pkgdict = self.mysettings.pkeywordsdict
aux_keys = ["KEYWORDS", "LICENSE", "EAPI", "SLOT"]
+
+ # Hack: Need to check the env directly here as otherwise stacking
+ # doesn't work properly as negative values are lost in the config
+ # object (bug #139600)
+ egroups = os.environ.get("ACCEPT_KEYWORDS", "").split()
+
for mycpv in mylist:
try:
keys, licenses, eapi, slot = self.aux_get(mycpv, aux_keys)
@@ -670,6 +676,7 @@ class portdbapi(dbapi):
matches = match_to_list(cpv_slot, pkgdict[cp].keys())
for atom in matches:
pgroups.extend(pkgdict[cp][atom])
+ pgroups.extend(egroups)
if matches:
# normalize pgroups with incrementals logic so it
# matches ACCEPT_KEYWORDS behavior