diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-05-26 21:17:19 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-05-26 21:17:19 +0000 |
commit | b512418b32c40272a05f332b4d7596acb0c24976 (patch) | |
tree | 80e481aa9e71b218fee0dc57c03de28cba6d76f8 /pym/portage/__init__.py | |
parent | 2225ec03ff3c6506b2c9a7555d82797b04eead97 (diff) | |
download | portage-b512418b32c40272a05f332b4d7596acb0c24976.tar.gz portage-b512418b32c40272a05f332b4d7596acb0c24976.tar.bz2 portage-b512418b32c40272a05f332b4d7596acb0c24976.zip |
Fix logic for USE_EXPAND variables that are incremental (there are none currently).
svn path=/main/trunk/; revision=6635
Diffstat (limited to 'pym/portage/__init__.py')
-rw-r--r-- | pym/portage/__init__.py | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index 6d28405d4..0f90e2dd6 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -1968,23 +1968,31 @@ class config: for var in cur_use_expand: var_lower = var.lower() - if var not in myincrementals: + is_not_incremental = var not in myincrementals + if is_not_incremental: prefix = var_lower + "_" for x in list(myflags): if x.startswith(prefix): myflags.remove(x) for x in curdb[var].split(): - # Any incremental USE_EXPAND variables have already been - # processed, so leading +/- operators are invalid here. if x[0] == "+": - writemsg(colorize("BAD", "Invalid '+' operator in " + \ - "non-incremental variable '%s': '%s'\n" % (var, x)), - noiselevel=-1) + if is_not_incremental: + writemsg(colorize("BAD", "Invalid '+' " + \ + "operator in non-incremental variable " + \ + "'%s': '%s'\n" % (var, x)), noiselevel=-1) + continue + else: + writemsg(colorize("BAD", "Invalid '+' " + \ + "operator in incremental variable " + \ + "'%s': '%s'\n" % (var, x)), noiselevel=-1) x = x[1:] if x[0] == "-": - writemsg(colorize("BAD", "Invalid '-' operator in " + \ - "non-incremental variable '%s': '%s'\n" % (var, x)), - noiselevel=-1) + if is_not_incremental: + writemsg(colorize("BAD", "Invalid '-' " + \ + "operator in non-incremental variable " + \ + "'%s': '%s'\n" % (var, x)), noiselevel=-1) + continue + myflags.discard(var_lower + "_" + x[1:]) continue myflags.add(var_lower + "_" + x) |