summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-06-22 12:59:19 +0000
committerZac Medico <zmedico@gentoo.org>2006-06-22 12:59:19 +0000
commit4962abc30cfa078d16a0dd19166a08de1ae6e57d (patch)
treee01aa1b7d78abcd2f09811015480f72c82deeffe
parent79a1fc717624f039bb05c1402eb0de530820cae3 (diff)
downloadportage-4962abc30cfa078d16a0dd19166a08de1ae6e57d.tar.gz
portage-4962abc30cfa078d16a0dd19166a08de1ae6e57d.tar.bz2
portage-4962abc30cfa078d16a0dd19166a08de1ae6e57d.zip
Move the --sync and --metadata code from global scope to a function.
svn path=/main/trunk/; revision=3595
-rwxr-xr-xbin/emerge12
1 files changed, 7 insertions, 5 deletions
diff --git a/bin/emerge b/bin/emerge
index ec81f8be1..65aa4bde3 100755
--- a/bin/emerge
+++ b/bin/emerge
@@ -2725,11 +2725,7 @@ def validate_merge_list(mergelist):
if "--debug" in myopts:
edebug=1
-if myaction in ["sync","metadata"] and (not "--help" in myopts):
- if "--pretend" in myopts:
- print "emerge: \"sync\" actions do not support \"--pretend.\""
- sys.exit(1)
-
+def action_sync():
emergelog(" === "+str(myaction))
myportdir=portage.settings["PORTDIR"]
if myportdir[-1]=="/":
@@ -3168,6 +3164,12 @@ if myaction in ["sync","metadata"] and (not "--help" in myopts):
print red(" * ")+"configuration files."
print red(" * ")+"To update portage, run 'emerge portage'."
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":
emergelog(" === regen")
#regenerate cache entries