From: Zac Medico Date: Fri, 26 Mar 2010 22:51:25 +0000 (-0700) Subject: Process help and version actions asap. Thanks to Brian Harring. X-Git-Tag: v2.2_rc68~689 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=7b03f5f2a77a1d9abc824316c793891abe147e61;p=portage.git Process help and version actions asap. Thanks to Brian Harring. --- diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py index 27948e51b..3e89e2905 100644 --- a/pym/_emerge/main.py +++ b/pym/_emerge/main.py @@ -1211,6 +1211,16 @@ def emerge_main(): adjust_configs(myopts, trees) apply_priorities(settings) + if myaction == 'version': + writemsg_stdout(getportageversion( + settings["PORTDIR"], settings["ROOT"], + settings.profile_path, settings["CHOST"], + trees[settings["ROOT"]]["vartree"].dbapi) + '\n', noiselevel=-1) + return 0 + elif myaction == 'help': + _emerge.help.help(myopts, portage.output.havecolor) + return 0 + spinner = stdout_spinner() if "candy" in settings.features: spinner.update = spinner.update_scroll @@ -1347,15 +1357,6 @@ def emerge_main(): not sys.stdout.isatty(): spinner.update = spinner.update_basic - if myaction == 'version': - print(getportageversion(settings["PORTDIR"], settings["ROOT"], - settings.profile_path, settings["CHOST"], - trees[settings["ROOT"]]["vartree"].dbapi)) - return 0 - elif myaction == "help": - _emerge.help.help(myopts, portage.output.havecolor) - return 0 - if "--debug" in myopts: print("myaction", myaction) print("myopts", myopts)