behavior that may have been implied by some other option like --update.
svn path=/main/trunk/; revision=14120
\fBDEPEND\fR variable. However, behavior may change for new
\fBEAPI\fRs when related extensions are added in the future.
.TP
-.BR "\-\-selective"
+.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.
+Some options, such as \fB\-\-update\fR, imply \fB\-\-selective\fR.
+Use \fB\-\-selective=n\fR if you want to forcefully disable
+\fB\-\-selective\fR, regardless of options like \fB\-\-update\fR.
.TP
.BR "\-\-skipfirst"
This option is only valid when used with \fB\-\-resume\fR. It removes the
# Distributed under the terms of the GNU General Public License v2
# $Id$
+import logging
+from portage.util import writemsg_level
+
def create_depgraph_params(myopts, myaction):
#configure emerge engine parameters
#
"--newuse" in myopts or \
"--reinstall" in myopts or \
"--noreplace" in myopts or \
- "--selective" in myopts:
+ myopts.get("--selective", "n") != "n":
myparams["selective"] = True
if "--emptytree" in myopts:
myparams["empty"] = True
myparams["deep"] = myopts["--deep"]
if "--complete-graph" in myopts:
myparams["complete"] = True
+ if myopts.get("--selective") == "n":
+ # --selective=n can be used to remove selective
+ # behavior that may have been implied by some
+ # other option like --update.
+ myparams.pop("selective", None)
+
+ if '--debug' in myopts:
+ writemsg_level('\n\nmyparams %s\n\n' % myparams,
+ noiselevel=-1, level=logging.DEBUG)
+
return myparams
for line in wrap(desc, desc_width):
print desc_indent + line
print
- print " " + green("--selective")
+ 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."
+ "does not take precedence over options such as --newuse. " + \
+ "Some options, such as --update, imply --selective. " + \
+ "Use --selective=n if you want to forcefully disable " + \
+ "--selective, regardless of options like --update."
for line in wrap(desc, desc_width):
print desc_indent + line
print
"--nospinner", "--oneshot",
"--onlydeps", "--pretend",
"--quiet", "--resume",
-"--searchdesc", "--selective",
+"--searchdesc",
"--skipfirst",
"--tree",
"--update",
'--getbinpkgonly' : ('n',),
'--jobs' : valid_integers,
'--root-deps' : ('rdeps',),
+ '--selective' : ('n',),
'--usepkg' : ('n',),
'--usepkgonly' : ('n',),
}
"choices" :("True", "rdeps")
},
+ "--selective": {
+ "help" : "similar to the --noreplace but does not take " + \
+ "precedence over options such as --newuse",
+ "type" : "choice",
+ "choices" : ("True", "n")
+ },
+
"--usepkg": {
"shortopt" : "-k",
"help" : "use binary packages",
if myoptions.root_deps == "True":
myoptions.root_deps = True
+ if myoptions.selective == "True":
+ myoptions.selective = True
+
if myoptions.deep is not None:
deep = None
if myoptions.deep == "True":