From: Zac Medico Date: Wed, 30 May 2007 02:44:41 +0000 (-0000) Subject: For bug #61732, support -flag in USE (instead of just +flag). Given the current... X-Git-Tag: v2.1.2.9~4 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=2ccc1bdd379690eeaf36181b49ec01dc294f0e36;p=portage.git For bug #61732, support -flag in USE (instead of just +flag). Given the current default USE_ORDER, -flag in IUSE has no effect. (trunk r6671) svn path=/main/branches/2.1.2/; revision=6672 --- diff --git a/bin/ebuild.sh b/bin/ebuild.sh index 2590fcd9a..25e41ec9d 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -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}" diff --git a/bin/emerge b/bin/emerge index 7b5e6f378..03446c7c8 100755 --- a/bin/emerge +++ b/bin/emerge @@ -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 diff --git a/pym/portage.py b/pym/portage.py index 83edfeaa9..ecf14c703 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -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