# 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}"
def filter_iuse_defaults(iuse):
for flag in iuse:
- if flag.startswith("+"):
+ if flag.startswith("+") or flag.startswith("-"):
yield flag[1:]
else:
yield flag
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