summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--man/emerge.16
-rw-r--r--pym/_emerge/help.py8
-rw-r--r--pym/_emerge/main.py13
3 files changed, 27 insertions, 0 deletions
diff --git a/man/emerge.1 b/man/emerge.1
index fc0a880eb..c516755f3 100644
--- a/man/emerge.1
+++ b/man/emerge.1
@@ -476,6 +476,12 @@ be enabled under normal circumstances. For currently supported
\fBDEPEND\fR variable. However, behavior may change for new
\fBEAPI\fRs when related extensions are added in the future.
.TP
+.BR "\-\-select"[=n]
+Add specified packages to the world set (inverse of
+\fB\-\-oneshot\fR). This is useful if you want to
+use \fBEMERGE_DEFAULT_OPTS\fR to make
+\fB\-\-oneshot\fR behavior default.
+.TP
.BR "\-\-selective"[=n]
This is similar to the \fB\-\-noreplace\fR option, except that it
does not take precedence over options such as \fB\-\-newuse\fR.
diff --git a/pym/_emerge/help.py b/pym/_emerge/help.py
index 50145dad5..bbeb2fb36 100644
--- a/pym/_emerge/help.py
+++ b/pym/_emerge/help.py
@@ -502,6 +502,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 3e445b2e8..ac63419c7 100644
--- a/pym/_emerge/main.py
+++ b/pym/_emerge/main.py
@@ -389,6 +389,7 @@ def insert_optional_args(args):
'--jobs' : valid_integers,
'--keep-going' : ('n',),
'--root-deps' : ('rdeps',),
+ '--select' : ('n',),
'--selective' : ('n',),
'--usepkg' : ('n',),
'--usepkgonly' : ('n',),
@@ -613,6 +614,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",
@@ -704,6 +712,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