Add support for --keep-going=n so that it can be disabled on the command line
after it's been enabled in EMERGE_DEFAULT_OPTS.

svn path=/main/trunk/; revision=14121
diff --git a/man/emerge.1 b/man/emerge.1
index 1781988..0e1d29b 100644
--- a/man/emerge.1
+++ b/man/emerge.1
@@ -343,7 +343,7 @@
 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
diff --git a/pym/_emerge/help.py b/pym/_emerge/help.py
index cbd1fe4..18e4369 100644
--- a/pym/_emerge/help.py
+++ b/pym/_emerge/help.py
@@ -360,7 +360,7 @@
 		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 " + \
diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py
index c5a16ff..9115a25 100644
--- a/pym/_emerge/main.py
+++ b/pym/_emerge/main.py
@@ -45,7 +45,6 @@
 "--emptytree",
 "--fetchonly",    "--fetch-all-uri",
 "--ignore-default-opts",
-"--keep-going",
 "--noconfmem",
 "--newuse",
 "--nodeps",       "--noreplace",
@@ -376,6 +375,7 @@
 		'--getbinpkg'            : ('n',),
 		'--getbinpkgonly'        : ('n',),
 		'--jobs'       : valid_integers,
+		'--keep-going'           : ('n',),
 		'--root-deps'  : ('rdeps',),
 		'--selective'            : ('n',),
 		'--usepkg'               : ('n',),
@@ -533,6 +533,12 @@
 			"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 @@
 	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