summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-03-26 15:51:25 -0700
committerZac Medico <zmedico@gentoo.org>2010-03-26 15:51:25 -0700
commit7b03f5f2a77a1d9abc824316c793891abe147e61 (patch)
tree4f32eda6197361c72bac5a4598c6d51638f0cc2b
parent5877531f9dd4e103f8338bc2bd96c909220ff3ef (diff)
downloadportage-7b03f5f2a77a1d9abc824316c793891abe147e61.tar.gz
portage-7b03f5f2a77a1d9abc824316c793891abe147e61.tar.bz2
portage-7b03f5f2a77a1d9abc824316c793891abe147e61.zip
Process help and version actions asap. Thanks to Brian Harring.
-rw-r--r--pym/_emerge/main.py19
1 files changed, 10 insertions, 9 deletions
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)