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

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

index 2590fcd9a2739d48024404a32ed0bebaf4b966a5..25e41ec9d2f4484b2c55b8c6febd6a0ce54f1171 100755 (executable)
@@ -1574,7 +1574,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 7b5e6f37887343a9a67dc2726837740b48d56f70..03446c7c835e0175eef27c0e2d833c3084d60e1e 100755 (executable)
@@ -596,7 +596,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 83edfeaa967199219a5c6c9fe455fad9a70b8229..ecf14c703e281da00f2b435d28f29fdf77df30c6 100644 (file)
@@ -1682,7 +1682,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