summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorJason Stubbs <jstubbs@gentoo.org>2006-01-27 04:51:23 +0000
committerJason Stubbs <jstubbs@gentoo.org>2006-01-27 04:51:23 +0000
commit6d4e038b9b72021f37139620ed45f530fbf016f2 (patch)
tree76f714bc3b82bfe519d793bb8d9982d3a14e4c2a /bin
parent75dec43f2c32292f4c788d8e4fa845d2cbaeaa51 (diff)
downloadportage-6d4e038b9b72021f37139620ed45f530fbf016f2.tar.gz
portage-6d4e038b9b72021f37139620ed45f530fbf016f2.tar.bz2
portage-6d4e038b9b72021f37139620ed45f530fbf016f2.zip
Add support for an --alphabetical option to emerge that restores the old
ordering of flags in --pretend output. svn path=/main/trunk/; revision=2589
Diffstat (limited to 'bin')
-rwxr-xr-xbin/emerge15
1 files changed, 11 insertions, 4 deletions
diff --git a/bin/emerge b/bin/emerge
index a41b372a9..eba9a3d19 100755
--- a/bin/emerge
+++ b/bin/emerge
@@ -170,7 +170,7 @@ actions=[
"sync", "system", "unmerge", "world",
]
options=[
-"--ask",
+"--ask", "--alphabetical",
"--buildpkg", "--buildpkgonly",
"--changelog", "--columns", "--cols",
"--debug", "--deep",
@@ -1496,9 +1496,13 @@ class depgraph:
def create_use_string(*args):
return ""
else:
- def create_use_string(name, cur_iuse, cur_use, old_iuse, old_use, is_new, all_flags=("--verbose" in myopts)):
+ def create_use_string(name, cur_iuse, cur_use, old_iuse, old_use, is_new,
+ all_flags=("--verbose" in myopts), alphabetical=("--alphabetical" in myopts)):
enabled = []
- disabled = []
+ if alphabetical:
+ disabled = enabled
+ else:
+ disabled = []
for flag in cur_iuse:
if flag in cur_use:
if is_new or flag in old_use and all_flags:
@@ -1516,7 +1520,10 @@ class depgraph:
disabled.append(green("-"+flag)+"*")
enabled = " ".join(enabled)
- disabled = " ".join(disabled)
+ if alphabetical:
+ disabled = ""
+ else:
+ disabled = " ".join(disabled)
if enabled and disabled:
ret = enabled + " " + disabled
elif enabled: