diff options
author | Zac Medico <zmedico@gentoo.org> | 2009-10-18 03:55:06 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2009-10-18 03:55:06 +0000 |
commit | f999dc9b0ee307defdd1af30a57684ed7abe6f98 (patch) | |
tree | 4c214e8637dfa1e427423f5462c08108e92a18b2 /pym/_emerge | |
parent | b330c160cdbf58f644f5d9cc108c2d3fbe2ba44d (diff) | |
download | portage-f999dc9b0ee307defdd1af30a57684ed7abe6f98.tar.gz portage-f999dc9b0ee307defdd1af30a57684ed7abe6f98.tar.bz2 portage-f999dc9b0ee307defdd1af30a57684ed7abe6f98.zip |
Bug #287869 - Add a --selective[=n] option (inverse of --oneshot). This is
useful if you want to use EMERGE_DEFAULT_OPTS to make --oneshot behavior
default. (trunk r14615)
svn path=/main/branches/2.1.7/; revision=14643
Diffstat (limited to 'pym/_emerge')
-rw-r--r-- | pym/_emerge/help.py | 8 | ||||
-rw-r--r-- | pym/_emerge/main.py | 13 |
2 files changed, 21 insertions, 0 deletions
diff --git a/pym/_emerge/help.py b/pym/_emerge/help.py index ce5d4107d..3f18b5429 100644 --- a/pym/_emerge/help.py +++ b/pym/_emerge/help.py @@ -499,6 +499,14 @@ def help(myopts, havecolor=1): for line in wrap(desc, desc_width): print(desc_indent + line) print() + print(" " + green("--select") + "[=%s]" % turquoise("n")) + desc = "Add specified packages to the world set (inverse of " + \ + "--oneshot). This is useful if you want to " + \ + "use EMERGE_DEFAULT_OPTS to make " + \ + "--oneshot behavior default." + for line in wrap(desc, desc_width): + print(desc_indent + line) + print() print(" " + green("--selective") + "[=%s]" % turquoise("n")) desc = "This is similar to the --noreplace option, except that it " + \ "does not take precedence over options such as --newuse. " + \ diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py index 4215d80b9..10e605e56 100644 --- a/pym/_emerge/main.py +++ b/pym/_emerge/main.py @@ -311,6 +311,7 @@ def insert_optional_args(args): '--jobs' : valid_integers, '--keep-going' : ('n',), '--root-deps' : ('rdeps',), + '--select' : ('n',), '--selective' : ('n',), '--usepkg' : ('n',), '--usepkgonly' : ('n',), @@ -535,6 +536,13 @@ def parse_opts(tmpcmdline, silent=False): "choices" :("True", "rdeps") }, + "--select": { + "help" : "add specified packages to the world set " + \ + "(inverse of --oneshot)", + "type" : "choice", + "choices" : ("True", "n") + }, + "--selective": { "help" : "similar to the --noreplace but does not take " + \ "precedence over options such as --newuse", @@ -626,6 +634,11 @@ def parse_opts(tmpcmdline, silent=False): if myoptions.root_deps == "True": myoptions.root_deps = True + if myoptions.select == "True": + myoptions.oneshot = False + elif myoptions.select == "n": + myoptions.oneshot = True + if myoptions.selective == "True": myoptions.selective = True |