summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-05-30 02:42:05 +0000
committerZac Medico <zmedico@gentoo.org>2007-05-30 02:42:05 +0000
commit0ae7a650e2d6c507de3d3e54c0734485ccea232c (patch)
treeef65485611dc37166269fe6c056be544981382f8 /pym
parentcc076b03ce16db9b139b8e4ec63174fddf883468 (diff)
downloadportage-0ae7a650e2d6c507de3d3e54c0734485ccea232c.tar.gz
portage-0ae7a650e2d6c507de3d3e54c0734485ccea232c.tar.bz2
portage-0ae7a650e2d6c507de3d3e54c0734485ccea232c.zip
For bug #61732, support -flag in USE (instead of just +flag). Given the current default USE_ORDER, -flag in IUSE has no effect.
svn path=/main/trunk/; revision=6671
Diffstat (limited to 'pym')
-rw-r--r--pym/emerge/__init__.py2
-rw-r--r--pym/portage/__init__.py7
2 files changed, 7 insertions, 2 deletions
diff --git a/pym/emerge/__init__.py b/pym/emerge/__init__.py
index 5f4219259..592dda9cc 100644
--- a/pym/emerge/__init__.py
+++ b/pym/emerge/__init__.py
@@ -598,7 +598,7 @@ def genericdict(mylist):
def filter_iuse_defaults(iuse):
for flag in iuse:
- if flag.startswith("+"):
+ if flag.startswith("+") or flag.startswith("-"):
yield flag[1:]
else:
yield flag
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index 59716ac69..c61c0bda9 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -1695,7 +1695,12 @@ class config:
if mydb:
slot, iuse = mydb.aux_get(self.mycpv, ["SLOT", "IUSE"])
cpv_slot = "%s:%s" % (self.mycpv, slot)
- pkginternaluse = [x[1:] for x in iuse.split() if x.startswith("+")]
+ pkginternaluse = []
+ for x in iuse.split():
+ if x.startswith("+"):
+ pkginternaluse.append(x[1:])
+ elif x.startswith("-"):
+ pkginternaluse.append(x)
pkginternaluse = " ".join(pkginternaluse)
if pkginternaluse != self.configdict["pkginternal"].get("USE", ""):
self.configdict["pkginternal"]["USE"] = pkginternaluse