summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-08-24 07:43:36 +0000
committerZac Medico <zmedico@gentoo.org>2006-08-24 07:43:36 +0000
commit5a76583a1418e3d8ba050aa5d3ad7c4600c040ec (patch)
tree2a5b710e9fc81cc68aebe123204b9966f36c887a
parentb655977224cb411ffc85d0371f83349e5872b42e (diff)
downloadportage-5a76583a1418e3d8ba050aa5d3ad7c4600c040ec.tar.gz
portage-5a76583a1418e3d8ba050aa5d3ad7c4600c040ec.tar.bz2
portage-5a76583a1418e3d8ba050aa5d3ad7c4600c040ec.zip
Display flags that have been removed from IUSE as !flag% for bug #144661.
svn path=/main/trunk/; revision=4322
-rwxr-xr-xbin/emerge27
1 files changed, 16 insertions, 11 deletions
diff --git a/bin/emerge b/bin/emerge
index 8d476aeb0..faedc3c50 100755
--- a/bin/emerge
+++ b/bin/emerge
@@ -1309,12 +1309,20 @@ class depgraph:
enabled = []
if alphabetical:
disabled = enabled
+ removed = enabled
else:
disabled = []
- for flag in cur_iuse:
+ removed = []
+ cur_iuse = set(cur_iuse)
+ enabled_flags = cur_iuse.intersection(cur_use)
+ removed_iuse = set(old_iuse).difference(cur_iuse)
+ any_iuse = cur_iuse.union(old_iuse)
+ any_iuse = list(any_iuse)
+ any_iuse.sort()
+ for flag in any_iuse:
flag_str = None
isEnabled = False
- if flag in cur_use:
+ if flag in enabled_flags:
isEnabled = True
if is_new or flag in old_use and all_flags:
flag_str = red(flag)
@@ -1322,6 +1330,10 @@ class depgraph:
flag_str = yellow(flag) + "%"
elif flag not in old_use:
flag_str = green(flag) + "*"
+ elif flag in removed_iuse:
+ if all_flags:
+ removed.append(yellow("!" + flag) + "%")
+ continue
else:
if is_new or flag in old_iuse and flag not in old_use and all_flags:
flag_str = blue("-" + flag)
@@ -1337,17 +1349,10 @@ class depgraph:
else:
disabled.append(flag_str)
- enabled = " ".join(enabled)
if alphabetical:
- disabled = ""
- else:
- disabled = " ".join(disabled)
- if enabled and disabled:
- ret = enabled + " " + disabled
- elif enabled:
- ret = enabled
+ ret = " ".join(enabled)
else:
- ret = disabled
+ ret = " ".join(enabled + disabled + removed)
if ret:
ret = '%s="%s" ' % (name, ret)
return ret