diff options
Diffstat (limited to 'pym/_emerge/main.py')
-rw-r--r-- | pym/_emerge/main.py | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py index 368def9f9..cc46e6d9d 100644 --- a/pym/_emerge/main.py +++ b/pym/_emerge/main.py @@ -50,7 +50,7 @@ if sys.hexversion >= 0x3000000: long = int options=[ -"--ask", "--alphabetical", +"--alphabetical", "--ask-enter-invalid", "--buildpkgonly", "--changed-use", @@ -77,7 +77,6 @@ options=[ shortmapping={ "1":"--oneshot", -"a":"--ask", "B":"--buildpkgonly", "c":"--depclean", "C":"--unmerge", @@ -422,6 +421,7 @@ def insert_optional_args(args): new_args = [] default_arg_opts = { + '--ask' : y_or_n, '--autounmask' : y_or_n, '--buildpkg' : y_or_n, '--complete-graph' : y_or_n, @@ -456,6 +456,7 @@ def insert_optional_args(args): # Don't make things like "-kn" expand to "-k n" # since existence of -n makes it too ambiguous. short_arg_opts_n = { + 'a' : y_or_n, 'b' : y_or_n, 'g' : y_or_n, 'G' : y_or_n, @@ -560,6 +561,13 @@ def parse_opts(tmpcmdline, silent=False): true_y = ("True", "y") argument_options = { + "--ask": { + "shortopt" : "-a", + "help" : "prompt before performing any actions", + "type" : "choice", + "choices" : true_y_or_n + }, + "--autounmask": { "help" : "automatically unmask packages", "type" : "choice", @@ -807,6 +815,11 @@ def parse_opts(tmpcmdline, silent=False): myoptions, myargs = parser.parse_args(args=tmpcmdline) + if myoptions.ask in true_y: + myoptions.ask = True + else: + myoptions.ask = None + if myoptions.autounmask in true_y: myoptions.autounmask = True |