For bug #61732, support -flag in USE (instead of just +flag). Given the current...
authorZac Medico <zmedico@gentoo.org>
Wed, 30 May 2007 02:42:05 +0000 (02:42 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 30 May 2007 02:42:05 +0000 (02:42 -0000)
svn path=/main/trunk/; revision=6671

bin/ebuild.sh
pym/emerge/__init__.py
pym/portage/__init__.py

index 8b9981a1e7610696873f3410e3790f0cdd9ca36b..e533ca31d36bca25bb3859f16c0cb06910dd248b 100755 (executable)
@@ -1501,7 +1501,7 @@ if [ "${EBUILD_PHASE}" != "depend" ]; then
        # Make IUSE defaults backward compatible with all the old shell code.
        iuse_temp=""
        for x in ${IUSE} ; do
-               if [[ ${x} == +* ]]; then
+               if [[ ${x} == +* ]] || [[ ${x} == -* ]] ; then
                        iuse_temp="${iuse_temp} ${x:1}"
                else
                        iuse_temp="${iuse_temp} ${x}"
index 5f4219259c39b550ee05a8272838c1d6f1ce854c..592dda9ccc4115c6cb0e3af457347482174d7b8a 100644 (file)
@@ -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
index 59716ac690779746afb38f0e5f89159b87ea8462..c61c0bda91787e957c6723bda25ea04134d2ecec 100644 (file)
@@ -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