summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-12-25 06:04:03 +0000
committerZac Medico <zmedico@gentoo.org>2006-12-25 06:04:03 +0000
commitf19d539f821e32b5433cb9961e2ee3d961ed0eb0 (patch)
tree8b312413901072c7efcf3adcb227716a18b2ab8d
parentc35a6d0e825e72b8779610ae2a647ca903efe4da (diff)
downloadportage-f19d539f821e32b5433cb9961e2ee3d961ed0eb0.tar.gz
portage-f19d539f821e32b5433cb9961e2ee3d961ed0eb0.tar.bz2
portage-f19d539f821e32b5433cb9961e2ee3d961ed0eb0.zip
Prevent the regen action from running in --pretend mode.
svn path=/main/trunk/; revision=5388
-rwxr-xr-xbin/emerge19
1 files changed, 8 insertions, 11 deletions
diff --git a/bin/emerge b/bin/emerge
index afa336cba..5f8bd5f61 100755
--- a/bin/emerge
+++ b/bin/emerge
@@ -5018,23 +5018,20 @@ def emerge_main():
xtermTitleReset()
portage.atexit_register(emergeexit)
- if myaction in ["sync","metadata"] and "--help" not in myopts:
+ if myaction in ("config", "metadata", "regen", "sync"):
if "--pretend" in myopts:
- print "emerge: \"sync\" actions do not support \"--pretend.\""
- sys.exit(1)
- if "sync" == myaction:
- action_sync(settings, trees, mtimedb, myopts, myaction)
- else:
- action_metadata(settings, portdb, myopts)
+ sys.stderr.write(("emerge: The '%s' action does " + \
+ "not support '--pretend'.\n") % myaction)
+ return 1
+ if "sync" == myaction:
+ action_sync(settings, trees, mtimedb, myopts, myaction)
+ elif "metadata" == myaction:
+ action_metadata(settings, portdb, myopts)
elif myaction=="regen":
validate_ebuild_environment(trees)
action_regen(settings, portdb)
# HELP action
elif "config"==myaction:
- if "--pretend" in myopts:
- sys.stderr.write("emerge: The --config action " + \
- "does not support --pretend.\n")
- return 1
validate_ebuild_environment(trees)
action_config(settings, trees, myopts, myfiles)