Add support for --keep-going=n so that it can be disabled on the command line
authorZac Medico <zmedico@gentoo.org>
Fri, 21 Aug 2009 22:04:51 +0000 (22:04 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 21 Aug 2009 22:04:51 +0000 (22:04 -0000)
after it's been enabled in EMERGE_DEFAULT_OPTS.

svn path=/main/trunk/; revision=14121

man/emerge.1
pym/_emerge/help.py
pym/_emerge/main.py

index 178198810e28680f0db4135c73a94ae2ee5eb388..0e1d29b0a19694243f60c6cf93573008926d1a4c 100644 (file)
@@ -343,7 +343,7 @@ Specifies the number of packages to build simultaneously. If this option is
 given without an argument, emerge will not limit the number of jobs that can
 run simultaneously. Also see the related \fB\-\-load\-average\fR option.
 .TP
-.BR "\-\-keep\-going"
+.BR "\-\-keep\-going[=n]"
 Continue as much as possible after an error. When an error occurs,
 dependencies are recalculated for remaining packages and any with
 unsatisfied dependencies are automatically dropped. Also see
index cbd1fe491739b0ecad200581edf938fc07b7fb62..18e4369b673f71ca00f6ea133647747b5b0a1902 100644 (file)
@@ -360,7 +360,7 @@ def help(myopts, havecolor=1):
                for line in wrap(desc, desc_width):
                        print desc_indent + line
                print
-               print "       "+green("--keep-going")
+               print "       " + green("--keep-going") + "[=%s]" % turquoise("n")
                desc = "Continue as much as possible after " + \
                        "an error. When an error occurs, " + \
                        "dependencies are recalculated for " + \
index c5a16ff42d60087c51aa8ab713dee3c3f66ca310..9115a25d65b45e20a0e8dde54937fd1ac0697049 100644 (file)
@@ -45,7 +45,6 @@ options=[
 "--emptytree",
 "--fetchonly",    "--fetch-all-uri",
 "--ignore-default-opts",
-"--keep-going",
 "--noconfmem",
 "--newuse",
 "--nodeps",       "--noreplace",
@@ -376,6 +375,7 @@ def insert_optional_args(args):
                '--getbinpkg'            : ('n',),
                '--getbinpkgonly'        : ('n',),
                '--jobs'       : valid_integers,
+               '--keep-going'           : ('n',),
                '--root-deps'  : ('rdeps',),
                '--selective'            : ('n',),
                '--usepkg'               : ('n',),
@@ -533,6 +533,12 @@ def parse_opts(tmpcmdline, silent=False):
                        "action" : "store"
                },
 
+               "--keep-going": {
+                       "help"    : "continue as much as possible after an error",
+                       "type"    : "choice",
+                       "choices" : ("True", "n")
+               },
+
                "--load-average": {
 
                        "help"   :"Specifies that no new builds should be started " + \
@@ -661,6 +667,11 @@ def parse_opts(tmpcmdline, silent=False):
        else:
                myoptions.getbinpkgonly = None
 
+       if myoptions.keep_going in ("True",):
+               myoptions.keep_going = True
+       else:
+               myoptions.keep_going = None
+
        if myoptions.root_deps == "True":
                myoptions.root_deps = True