diff options
author | Zac Medico <zmedico@gentoo.org> | 2006-06-22 14:24:14 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2006-06-22 14:24:14 +0000 |
commit | 09a67e296a9585f7cf2212f3b286d7a9a8a8de72 (patch) | |
tree | 10d6091138d3756ea8b3dd8069bf7f27b7f92ca8 | |
parent | 432608f64b76a3cc2aee2831507d64627a558398 (diff) | |
download | portage-09a67e296a9585f7cf2212f3b286d7a9a8a8de72.tar.gz portage-09a67e296a9585f7cf2212f3b286d7a9a8a8de72.tar.bz2 portage-09a67e296a9585f7cf2212f3b286d7a9a8a8de72.zip |
Move the --depclean code from global scope to a function.
svn path=/main/trunk/; revision=3601
-rwxr-xr-x | bin/emerge | 48 |
1 files changed, 25 insertions, 23 deletions
diff --git a/bin/emerge b/bin/emerge index dab03bd7b..de48bb6bb 100755 --- a/bin/emerge +++ b/bin/emerge @@ -3342,29 +3342,7 @@ def action_search(): sys.exit(1) searchinstance.output() -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: - action_search() -elif "unmerge"==myaction or "prune"==myaction or "clean"==myaction: - if 1 == unmerge(myaction, myfiles, raise_on_missing=False): - post_emerge() - -elif "depclean"==myaction: +def action_depclean(): # Kill packages that aren't explicitly merged or are required as a # dependency of another package. World file is explicit. @@ -3486,6 +3464,30 @@ elif "depclean"==myaction: print "Number removed: "+str(len(cleanlist)) post_emerge() +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: + action_search() +elif "unmerge"==myaction or "prune"==myaction or "clean"==myaction: + if 1 == unmerge(myaction, myfiles, raise_on_missing=False): + post_emerge() + +elif "depclean"==myaction: + action_depclean() # "update", "system", or just process files: else: favorites=[] |