summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-06-22 13:15:08 +0000
committerZac Medico <zmedico@gentoo.org>2006-06-22 13:15:08 +0000
commit3209babe59edce8f808f69e26ed6135e29c8db0e (patch)
tree43d8d487d34090ded606a5ab164b0a1d6310efe2
parentf3ad5788ae2b1c08890226a8d5177b8b5ffdbe65 (diff)
downloadportage-3209babe59edce8f808f69e26ed6135e29c8db0e.tar.gz
portage-3209babe59edce8f808f69e26ed6135e29c8db0e.tar.bz2
portage-3209babe59edce8f808f69e26ed6135e29c8db0e.zip
Move the --config code from global scope to a function.
svn path=/main/trunk/; revision=3597
-rwxr-xr-xbin/emerge21
1 files changed, 12 insertions, 9 deletions
diff --git a/bin/emerge b/bin/emerge
index a07eae625..dc807ec17 100755
--- a/bin/emerge
+++ b/bin/emerge
@@ -3191,15 +3191,7 @@ def action_regen():
print "\n error processing %(cpv)s, continuing... (%(e)s)" % {"cpv":y,"e":str(e)}
print "done!"
-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:
+def action_config():
if len(myfiles) != 1 or "system" in myfiles or "world" in myfiles:
print red("!!! config can only take a single package atom at this time\n")
sys.exit(1)
@@ -3254,6 +3246,17 @@ elif "config"==myaction:
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:
unameout=commands.getstatusoutput("uname -mrp")[1]