From 6d4e038b9b72021f37139620ed45f530fbf016f2 Mon Sep 17 00:00:00 2001 From: Jason Stubbs Date: Fri, 27 Jan 2006 04:51:23 +0000 Subject: Add support for an --alphabetical option to emerge that restores the old ordering of flags in --pretend output. svn path=/main/trunk/; revision=2589 --- bin/emerge | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'bin/emerge') 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: -- cgit v1.2.3-1-g7c22