summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-06-22 13:10:05 +0000
committerZac Medico <zmedico@gentoo.org>2006-06-22 13:10:05 +0000
commitf3ad5788ae2b1c08890226a8d5177b8b5ffdbe65 (patch)
treedb29223e2a3dd7d4b0f08dfbb9533b3fd606bb3b /bin
parent4962abc30cfa078d16a0dd19166a08de1ae6e57d (diff)
downloadportage-f3ad5788ae2b1c08890226a8d5177b8b5ffdbe65.tar.gz
portage-f3ad5788ae2b1c08890226a8d5177b8b5ffdbe65.tar.bz2
portage-f3ad5788ae2b1c08890226a8d5177b8b5ffdbe65.zip
Move the --regen code from global scope to a function.
svn path=/main/trunk/; revision=3596
Diffstat (limited to 'bin')
-rwxr-xr-xbin/emerge15
1 files changed, 9 insertions, 6 deletions
diff --git a/bin/emerge b/bin/emerge
index 65aa4bde3..a07eae625 100755
--- a/bin/emerge
+++ b/bin/emerge
@@ -3165,12 +3165,7 @@ def action_sync():
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":
+def action_regen():
emergelog(" === regen")
#regenerate cache entries
print "Regenerating cache entries... "
@@ -3195,6 +3190,14 @@ elif myaction=="regen":
except Exception, e:
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:
if len(myfiles) != 1 or "system" in myfiles or "world" in myfiles: