diff options
-rwxr-xr-x | bin/emerge | 15 | ||||
-rw-r--r-- | man/emerge.1 | 4 | ||||
-rw-r--r-- | pym/emergehelp.py | 6 |
3 files changed, 21 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: diff --git a/man/emerge.1 b/man/emerge.1 index 1a2554a1b..0b39ff926 100644 --- a/man/emerge.1 +++ b/man/emerge.1 @@ -202,6 +202,10 @@ emerge process has completed. This usually entails configuration file setup or other similar setups that the user may wish to run. .SH "OPTIONS" .TP +.BR "\-\-alphabetical " +When displaying USE and other flag output, combines the enabled and +disabled lists into one list and sorts the whole list alphabetically. +.TP .BR "\-\-ask " (\fB\-a\fR) Before performing the merge, display what ebuilds and tbz2s will be installed, in the same format as when using \fB\-\-pretend\fR; then ask whether to diff --git a/pym/emergehelp.py b/pym/emergehelp.py index 19b30a6c5..9a80de50d 100644 --- a/pym/emergehelp.py +++ b/pym/emergehelp.py @@ -119,6 +119,12 @@ def help(myaction,myopts,havecolor=1): print " file setup or other similar setups that the user may wish to run." print print turquoise("Options:") + print " "+green("--alphabetical") + print " When displaying USE and other flag output, combines the enabled and" + print " disabled lists into one list and sorts the whole list" + print " alphabetically. With this option, output such as USE=\"dar -bar" + print " -foo\" will instead be displayed as USE=\"-bar dar -foo\"" + print print " "+green("--ask")+" ("+green("-a")+" short option)" print " before performing the merge, display what ebuilds and tbz2s will" print " be installed, in the same format as when using --pretend; then" |