diff options
author | Zac Medico <zmedico@gentoo.org> | 2006-06-22 14:11:07 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2006-06-22 14:11:07 +0000 |
commit | a6e498c6216720899f7533021c56b993ce04f422 (patch) | |
tree | 8883e050479642f97adcee315e98e7d1b011f665 | |
parent | 5cb203d7b3ffac05db6e0ad597c3fbdfc5d9211f (diff) | |
download | portage-a6e498c6216720899f7533021c56b993ce04f422.tar.gz portage-a6e498c6216720899f7533021c56b993ce04f422.tar.bz2 portage-a6e498c6216720899f7533021c56b993ce04f422.zip |
Move the --info code from global scope to a function.
svn path=/main/trunk/; revision=3599
-rwxr-xr-x | bin/emerge | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/bin/emerge b/bin/emerge index cf50cc8b3..2b4f93597 100755 --- a/bin/emerge +++ b/bin/emerge @@ -3247,19 +3247,7 @@ def action_config(): portage.doebuild(ebuildpath,"config",portage.root,mysettings,debug=("--debug" in myopts),cleanup=True,tree="vartree") print -if myaction in ["sync","metadata"] and "--help" not in myopts: - if "--pretend" in myopts: - print "emerge: \"sync\" actions do not support \"--pretend.\"" - sys.exit(1) - action_sync() -elif myaction=="regen": - action_regen() -# HELP action -elif "config"==myaction: - action_config() - -# INFO action -elif "info"==myaction: +def action_info(): unameout=commands.getstatusoutput("uname -mrp")[1] print getportageversion() print "=================================================================" @@ -3339,6 +3327,21 @@ elif "info"==myaction: if "cvs_id_string" in dir(module): print "%s: %s" % (str(x), str(module.cvs_id_string)) +if myaction in ["sync","metadata"] and "--help" not in myopts: + if "--pretend" in myopts: + print "emerge: \"sync\" actions do not support \"--pretend.\"" + sys.exit(1) + action_sync() +elif myaction=="regen": + action_regen() +# HELP action +elif "config"==myaction: + action_config() + +# INFO action +elif "info"==myaction: + action_info() + # SEARCH action elif "search"==myaction: if not myfiles: |