summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-11-23 17:16:03 -0800
committerZac Medico <zmedico@gentoo.org>2010-11-23 17:16:03 -0800
commit06743c96e7a62506dedb4e655dd950415b5628cf (patch)
treeb02dedaa2adfb519e900a1e145a1cdb8afdcb62b
parent9ed6332f2015e41f072f897764f550c5574ea96f (diff)
downloadportage-06743c96e7a62506dedb4e655dd950415b5628cf.tar.gz
portage-06743c96e7a62506dedb4e655dd950415b5628cf.tar.bz2
portage-06743c96e7a62506dedb4e655dd950415b5628cf.zip
emerge: accept 'y' for options that accept 'n'
This will fix bug #346349 and bug #344799.
-rw-r--r--man/emerge.134
-rw-r--r--pym/_emerge/help.py57
-rw-r--r--pym/_emerge/main.py117
3 files changed, 116 insertions, 92 deletions
diff --git a/man/emerge.1 b/man/emerge.1
index 21e8db21e..032554b93 100644
--- a/man/emerge.1
+++ b/man/emerge.1
@@ -133,7 +133,7 @@ unmerge matched packages that have no reverse dependencies. Use
\fB\-\-depclean\fR together with \fB\-\-verbose\fR to show reverse
dependencies.
.TP
-.BR "\-\-deselect[=n]"
+.BR "\-\-deselect [ y | n ]"
Remove atoms and/or sets from the world file. This action is implied
by uninstall actions, including \fB-\-depclean\fR,
\fB-\-prune\fR and \fB-\-unmerge\fR. Use \fB-\-deselect=n\fR
@@ -284,7 +284,7 @@ acceptance of the first choice. This option is
intended to be set in the \fBmake.conf\fR(5)
\fBEMERGE_DEFAULT_OPTS\fR variable.
.TP
-.BR "\-\-autounmask[=n]"
+.BR "\-\-autounmask [ y | n ]"
Automatically unmask packages. If any configuration
changes are required, then they will be displayed
after the merge list and emerge will immediately
@@ -299,11 +299,11 @@ Specifies an integer number of times to backtrack if
dependency calculation fails due to a conflict or an
unsatisfied dependency (default: \'10\').
.TP
-.BR "\-\-binpkg\-respect\-use < y | n >"
+.BR "\-\-binpkg\-respect\-use [ y | n ]"
Tells emerge to ignore binary packages if their use flags
don't match the current configuration. (default: \'n\')
.TP
-.BR "\-\-buildpkg[=n] " (\fB\-b\fR)
+.BR "\-\-buildpkg [ y | n ] (\-b short option)"
Tells emerge to build binary packages for all ebuilds processed in
addition to actually merging the packages. Useful for maintainers
or if you administrate multiple Gentoo Linux systems (build once,
@@ -334,7 +334,7 @@ is not a tty (by default, color is disabled unless stdout is a tty).
Used alongside \fB\-\-pretend\fR to cause the package name, new version,
and old version to be displayed in an aligned format for easy cut\-n\-paste.
.TP
-.BR "\-\-complete\-graph[=n]"
+.BR "\-\-complete\-graph [ y | n ]"
This causes \fBemerge\fR to consider the deep dependencies of all
packages from the world set. With this option enabled,
\fBemerge\fR will bail out if it determines that the given operation will
@@ -363,7 +363,7 @@ listed in the dependencies of a package. Also see \fB\-\-with\-bdeps\fR for
behavior with respect to build time dependencies that are not strictly
required.
.TP
-.BR "\-\-depclean\-lib\-check[=n]"
+.BR "\-\-depclean\-lib\-check [ y | n ]"
Account for library link-level dependencies during
\fB-\-depclean\fR and \fB-\-prune\fR actions. This
option is enabled by default. In some cases this can
@@ -380,7 +380,7 @@ A space separated list of package names or slot atoms.
Emerge won't install any ebuild or binary package that
matches any of the given package atoms.
.TP
-.BR "\-\-fail\-clean[=n]"
+.BR "\-\-fail\-clean [ y | n ]"
Clean up temporary files after a build failure. This is
particularly useful if you have \fBPORTAGE_TMPDIR\fR on
tmpfs. If this option is enabled, you probably also want
@@ -395,14 +395,14 @@ packages (fetch things from SRC_URI based upon USE setting).
Instead of doing any package building, just perform fetches for all
packages (fetch everything in SRC_URI regardless of USE setting).
.TP
-.BR "\-\-getbinpkg[=n] " (\fB\-g\fR)
+.BR "\-\-getbinpkg [ y | n ] (\-g short option)"
Using the server and location defined in \fIPORTAGE_BINHOST\fR (see
\fBmake.conf\fR(5)), portage will download the information from each binary
package found and it will use that information to help build the dependency
list. This option implies \fB\-k\fR. (Use \fB\-gK\fR for binary\-only
merging.)
.TP
-.BR "\-\-getbinpkgonly[=n] " (\fB\-G\fR)
+.BR "\-\-getbinpkgonly [ y | n ] (\-G short option)"
This option is identical to \fB\-g\fR, as above, except binaries from the
remote server are preferred over local packages if they are not identical.
.TP
@@ -417,7 +417,7 @@ Note that interactive packages currently force a setting
of \fI\-\-jobs=1\fR. This issue can be temporarily avoided
by specifying \fI\-\-accept\-properties=\-interactive\fR.
.TP
-.BR "\-\-keep\-going[=n]"
+.BR "\-\-keep\-going [ y | 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
@@ -478,7 +478,7 @@ for later updating.
Only merge (or pretend to merge) the dependencies of the packages
specified, not the packages themselves.
.TP
-.BR "\-\-package\-moves[=n]"
+.BR "\-\-package\-moves [ y | n ]"
Perform package moves when necessary. This option
is enabled by default. \fBWARNING:\fR This option
should remain enabled under normal circumstances.
@@ -519,7 +519,7 @@ Disable the warning message that's shown prior to
to be set in the \fBmake.conf\fR(5)
\fBEMERGE_DEFAULT_OPTS\fR variable.
.TP
-.BR "\-\-rebuilt\-binaries[=n]"
+.BR "\-\-rebuilt\-binaries [ y | n ]"
Replace installed packages with binary packages that have
been rebuilt. Rebuilds are detected by comparison of
BUILD_TIME package metadata. This option is enabled
@@ -554,13 +554,13 @@ 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]
+.BR "\-\-select [ y | 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]
+.BR "\-\-selective [ y | 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.
@@ -593,17 +593,17 @@ for testing and development. Package atoms specified on
the command line are greedy, meaning that unspecific
atoms may match multiple versions of slotted packages.
.TP
-.BR "\-\-use\-ebuild\-visibility[=n]"
+.BR "\-\-use\-ebuild\-visibility [ y | n ]"
Use unbuilt ebuild metadata for visibility
checks on built packages.
.TP
-.BR "\-\-usepkg[=n] " (\fB\-k\fR)
+.BR "\-\-usepkg [ y | n ] (\-k short option)"
Tells emerge to use binary packages (from $PKGDIR) if they are available, thus
possibly avoiding some time\-consuming compiles. This option is useful for CD
installs; you can export PKGDIR=/mnt/cdrom/packages and then use this option to
have emerge "pull" binary packages from the CD in order to satisfy dependencies.
.TP
-.BR "\-\-usepkgonly[=n] " (\fB\-K\fR)
+.BR "\-\-usepkgonly [ y | n ] (\-K short option)"
Tells emerge to only use binary packages (from $PKGDIR). All the binary
packages must be available at the time of dependency calculation or emerge
will simply abort. Portage does not use $PORTDIR when calculating dependency
diff --git a/pym/_emerge/help.py b/pym/_emerge/help.py
index 97562ab3b..ab8985d45 100644
--- a/pym/_emerge/help.py
+++ b/pym/_emerge/help.py
@@ -112,7 +112,8 @@ def help(myopts, havecolor=1):
for line in wrap(paragraph, desc_width):
print(desc_indent + line)
print()
- print(" " + green("--deselect") + "[=%s]" % turquoise("n"))
+ print(" " + green("--deselect") + " [ %s | %s ]" % \
+ (turquoise("y"), turquoise("n")))
paragraph = \
"Remove atoms and/or sets from the world file. This action is implied " + \
@@ -299,7 +300,8 @@ def help(myopts, havecolor=1):
for line in wrap(desc, desc_width):
print(desc_indent + line)
print()
- print(" " + green("--autounmask") + "[=%s]" % turquoise("n"))
+ print(" " + green("--autounmask") + " [ %s | %s ]" % \
+ (turquoise("y"), turquoise("n")))
desc = "Automatically unmask packages. If any configuration " + \
"changes are required, then they will be displayed " + \
"after the merge list and emerge will immediately " + \
@@ -318,14 +320,16 @@ def help(myopts, havecolor=1):
for line in wrap(desc, desc_width):
print(desc_indent + line)
print()
- print(" " + green("--binpkg-respect-use") + \
- " < " + turquoise("y") + " | " + turquoise("n") + " >")
+ print(" " + green("--binpkg-respect-use") + " [ %s | %s ]" % \
+ (turquoise("y"), turquoise("n")))
desc = "Tells emerge to ignore binary packages if their use flags" + \
" don't match the current configuration. (default: 'n')"
for line in wrap(desc, desc_width):
print(desc_indent + line)
print()
- print(" "+green("--buildpkg") + "[=%s]" % turquoise("n") + " ("+green("-b")+" short option)")
+ print(" " + green("--buildpkg") + \
+ " [ %s | %s ] (%s short option)" % \
+ (turquoise("y"), turquoise("n"), green("-b")))
desc = "Tells emerge to build binary packages for all ebuilds processed in" + \
" addition to actually merging the packages. Useful for maintainers" + \
" or if you administrate multiple Gentoo Linux systems (build once," + \
@@ -362,7 +366,8 @@ def help(myopts, havecolor=1):
print(" Display the pretend output in a tabular form. Versions are")
print(" aligned vertically.")
print()
- print(" "+green("--complete-graph") + "[=%s]" % turquoise("n"))
+ print(" "+green("--complete-graph") + " [ %s | %s ]" % \
+ (turquoise("y"), turquoise("n")))
desc = "This causes emerge to consider the deep dependencies of all" + \
" packages from the world set. With this option enabled," + \
" emerge will bail out if it determines that the given operation will" + \
@@ -399,7 +404,8 @@ def help(myopts, havecolor=1):
print()
if _ENABLE_DYN_LINK_MAP:
- print(" " + green("--depclean-lib-check") + "[=%s]" % turquoise("n"))
+ print(" " + green("--depclean-lib-check") + " [ %s | %s ]" % \
+ (turquoise("y"), turquoise("n")))
desc = "Account for library link-level dependencies during " + \
"--depclean and --prune actions. This " + \
"option is enabled by default. In some cases this can " + \
@@ -423,7 +429,8 @@ def help(myopts, havecolor=1):
for line in wrap(desc, desc_width):
print(desc_indent + line)
print()
- print(" "+green("--fail-clean[=n]"))
+ print(" " + green("--fail-clean") + " [ %s | %s ]" % \
+ (turquoise("y"), turquoise("n")))
desc = "Clean up temporary files after a build failure. This is " + \
"particularly useful if you have PORTAGE_TMPDIR on " + \
"tmpfs. If this option is enabled, you probably also want " + \
@@ -442,13 +449,17 @@ def help(myopts, havecolor=1):
print(" Same as --fetchonly except that all package files, including those")
print(" not required to build the package, will be processed.")
print()
- print(" "+green("--getbinpkg")+ "[=%s]" % turquoise("n") + " ("+green("-g")+" short option)")
+ print(" " + green("--getbinpkg") + \
+ " [ %s | %s ] (%s short option)" % \
+ (turquoise("y"), turquoise("n"), green("-g")))
print(" Using the server and location defined in PORTAGE_BINHOST, portage")
print(" will download the information from each binary file there and it")
print(" will use that information to help build the dependency list. This")
print(" option implies '-k'. (Use -gK for binary-only merging.)")
print()
- print(" "+green("--getbinpkgonly")+ "[=%s]" % turquoise("n") + " ("+green("-G")+" short option)")
+ print(" " + green("--getbinpkgonly") + \
+ " [ %s | %s ] (%s short option)" % \
+ (turquoise("y"), turquoise("n"), green("-G")))
print(" This option is identical to -g, as above, except it will not use")
print(" ANY information from the local machine. All binaries will be")
print(" downloaded from the remote server without consulting packages")
@@ -467,7 +478,8 @@ def help(myopts, havecolor=1):
for line in wrap(desc, desc_width):
print(desc_indent + line)
print()
- print(" " + green("--keep-going") + "[=%s]" % turquoise("n"))
+ print(" " + green("--keep-going") + " [ %s | %s ]" % \
+ (turquoise("y"), turquoise("n")))
desc = "Continue as much as possible after " + \
"an error. When an error occurs, " + \
"dependencies are recalculated for " + \
@@ -537,7 +549,8 @@ def help(myopts, havecolor=1):
print(" Only merge (or pretend to merge) the dependencies of the")
print(" specified packages, not the packages themselves.")
print()
- print(" " + green("--package-moves") + "[=%s]" % turquoise("n"))
+ print(" " + green("--package-moves") + " [ %s | %s ]" % \
+ (turquoise("y"), turquoise("n")))
desc = "Perform package moves when necessary. This option " + \
"is enabled by default. WARNING: This option " + \
"should remain enabled under normal circumstances. " + \
@@ -575,7 +588,8 @@ def help(myopts, havecolor=1):
for line in wrap(desc, desc_width):
print(desc_indent + line)
print()
- print(" "+green("--rebuilt-binaries") + "[=%s]" % turquoise("n"))
+ print(" " + green("--rebuilt-binaries") + " [ %s | %s ]" % \
+ (turquoise("y"), turquoise("n")))
desc = "Replace installed packages with binary packages that have " + \
"been rebuilt. Rebuilds are detected by comparison of " + \
"BUILD_TIME package metadata. This option is enabled " + \
@@ -619,7 +633,8 @@ def help(myopts, havecolor=1):
for line in wrap(desc, desc_width):
print(desc_indent + line)
print()
- print(" " + green("--select") + "[=%s]" % turquoise("n"))
+ print(" " + green("--select") + " [ %s | %s ]" % \
+ (turquoise("y"), 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 " + \
@@ -627,7 +642,8 @@ def help(myopts, havecolor=1):
for line in wrap(desc, desc_width):
print(desc_indent + line)
print()
- print(" " + green("--selective") + "[=%s]" % turquoise("n"))
+ print(" " + green("--selective") + " [ %s | %s ]" % \
+ (turquoise("y"), turquoise("n")))
desc = "This is similar to the --noreplace option, except that it " + \
"does not take precedence over options such as --newuse. " + \
"Some options, such as --update, imply --selective. " + \
@@ -673,13 +689,16 @@ def help(myopts, havecolor=1):
for line in wrap(desc, desc_width):
print(desc_indent + line)
print()
- print(" " + green("--use-ebuild-visibility") + "[=%s]" % turquoise("n"))
+ print(" " + green("--use-ebuild-visibility") + " [ %s | %s ]" % \
+ (turquoise("y"), turquoise("n")))
desc = "Use unbuilt ebuild metadata for visibility " + \
"checks on built packages."
for line in wrap(desc, desc_width):
print(desc_indent + line)
print()
- print(" "+green("--usepkg")+ "[=%s]" % turquoise("n") + " ("+green("-k")+" short option)")
+ print(" " + green("--usepkg") + \
+ " [ %s | %s ] (%s short option)" % \
+ (turquoise("y"), turquoise("n"), green("-k")))
print(" Tell emerge to use binary packages (from $PKGDIR) if they are")
print(" available, thus possibly avoiding some time-consuming compiles.")
print(" This option is useful for CD installs; you can export")
@@ -687,7 +706,9 @@ def help(myopts, havecolor=1):
print(" emerge \"pull\" binary packages from the CD in order to satisfy")
print(" dependencies.")
print()
- print(" "+green("--usepkgonly")+ "[=%s]" % turquoise("n") + " ("+green("-K")+" short option)")
+ print(" " + green("--usepkgonly") + \
+ " [ %s | %s ] (%s short option)" % \
+ (turquoise("y"), turquoise("n"), green("-K")))
print(" Like --usepkg above, except this only allows the use of binary")
print(" packages, and it will abort the emerge if the package is not")
print(" available at the time of dependency calculation.")
diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py
index ec56e9d3d..76cf031e2 100644
--- a/pym/_emerge/main.py
+++ b/pym/_emerge/main.py
@@ -390,33 +390,34 @@ def insert_optional_args(args):
return False
valid_integers = valid_integers()
+ y_or_n = ('y', 'n',)
new_args = []
default_arg_opts = {
- '--autounmask' : ('n',),
- '--buildpkg' : ('n',),
- '--complete-graph' : ('n',),
+ '--autounmask' : y_or_n,
+ '--buildpkg' : y_or_n,
+ '--complete-graph' : y_or_n,
'--deep' : valid_integers,
- '--deselect' : ('n',),
- '--binpkg-respect-use' : ('n', 'y',),
- '--fail-clean' : ('n',),
- '--getbinpkg' : ('n',),
- '--getbinpkgonly' : ('n',),
+ '--deselect' : y_or_n,
+ '--binpkg-respect-use' : y_or_n,
+ '--fail-clean' : y_or_n,
+ '--getbinpkg' : y_or_n,
+ '--getbinpkgonly' : y_or_n,
'--jobs' : valid_integers,
- '--keep-going' : ('n',),
- '--package-moves' : ('n',),
- '--rebuilt-binaries' : ('n',),
+ '--keep-going' : y_or_n,
+ '--package-moves' : y_or_n,
+ '--rebuilt-binaries' : y_or_n,
'--root-deps' : ('rdeps',),
- '--select' : ('n',),
- '--selective' : ('n',),
- "--use-ebuild-visibility": ('n',),
- '--usepkg' : ('n',),
- '--usepkgonly' : ('n',),
+ '--select' : y_or_n,
+ '--selective' : y_or_n,
+ "--use-ebuild-visibility": y_or_n,
+ '--usepkg' : y_or_n,
+ '--usepkgonly' : y_or_n,
}
if _ENABLE_DYN_LINK_MAP:
- default_arg_opts['--depclean-lib-check'] = ('n',)
+ default_arg_opts['--depclean-lib-check'] = y_or_n
short_arg_opts = {
'D' : valid_integers,
@@ -426,11 +427,11 @@ 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 = {
- 'b' : ('n',),
- 'g' : ('n',),
- 'G' : ('n',),
- 'k' : ('n',),
- 'K' : ('n',),
+ 'b' : y_or_n,
+ 'g' : y_or_n,
+ 'G' : y_or_n,
+ 'k' : y_or_n,
+ 'K' : y_or_n,
}
arg_stack = args[:]
@@ -525,12 +526,14 @@ def parse_opts(tmpcmdline, silent=False):
])
longopt_aliases = {"--cols":"--columns", "--skip-first":"--skipfirst"}
+ true_y_or_n = ("True", "y", "n")
+ true_y = ("True", "y")
argument_options = {
"--autounmask": {
"help" : "automatically unmask packages",
"type" : "choice",
- "choices" : ("True", "n")
+ "choices" : true_y_or_n
},
"--accept-properties": {
@@ -550,7 +553,7 @@ def parse_opts(tmpcmdline, silent=False):
"shortopt" : "-b",
"help" : "build binary packages",
"type" : "choice",
- "choices" : ("True", "n")
+ "choices" : true_y_or_n
},
"--config-root": {
@@ -566,7 +569,7 @@ def parse_opts(tmpcmdline, silent=False):
"--complete-graph": {
"help" : "completely account for all known dependencies",
"type" : "choice",
- "choices" : ("True", "n")
+ "choices" : true_y_or_n
},
"--deep": {
@@ -584,7 +587,7 @@ def parse_opts(tmpcmdline, silent=False):
"--deselect": {
"help" : "remove atoms/sets from the world file",
"type" : "choice",
- "choices" : ("True", "n")
+ "choices" : true_y_or_n
},
"--exclude": {
@@ -598,7 +601,7 @@ def parse_opts(tmpcmdline, silent=False):
"--fail-clean": {
"help" : "clean temp files after build failure",
"type" : "choice",
- "choices" : ("True", "n")
+ "choices" : true_y_or_n
},
"--jobs": {
@@ -614,7 +617,7 @@ def parse_opts(tmpcmdline, silent=False):
"--keep-going": {
"help" : "continue as much as possible after an error",
"type" : "choice",
- "choices" : ("True", "n")
+ "choices" : true_y_or_n
},
"--load-average": {
@@ -641,34 +644,34 @@ def parse_opts(tmpcmdline, silent=False):
"help" : "discard binary packages if their use flags \
don't match the current configuration",
"type" : "choice",
- "choices" : ("True", "y", "n")
+ "choices" : true_y_or_n
},
"--getbinpkg": {
"shortopt" : "-g",
"help" : "fetch binary packages",
"type" : "choice",
- "choices" : ("True", "n")
+ "choices" : true_y_or_n
},
"--getbinpkgonly": {
"shortopt" : "-G",
"help" : "fetch binary packages only",
"type" : "choice",
- "choices" : ("True", "n")
+ "choices" : true_y_or_n
},
"--package-moves": {
"help" : "perform package moves when necessary",
"type" : "choice",
- "choices" : ("True", "n")
+ "choices" : true_y_or_n
},
"--rebuilt-binaries": {
"help" : "replace installed packages with binary " + \
"packages that have been rebuilt",
"type" : "choice",
- "choices" : ("True", "n")
+ "choices" : true_y_or_n
},
"--rebuilt-binaries-timestamp": {
@@ -692,34 +695,34 @@ def parse_opts(tmpcmdline, silent=False):
"help" : "add specified packages to the world set " + \
"(inverse of --oneshot)",
"type" : "choice",
- "choices" : ("True", "n")
+ "choices" : true_y_or_n
},
"--selective": {
"help" : "similar to the --noreplace but does not take " + \
"precedence over options such as --newuse",
"type" : "choice",
- "choices" : ("True", "n")
+ "choices" : true_y_or_n
},
"--use-ebuild-visibility": {
"help" : "use unbuilt ebuild metadata for visibility checks on built packages",
"type" : "choice",
- "choices" : ("True", "n")
+ "choices" : true_y_or_n
},
"--usepkg": {
"shortopt" : "-k",
"help" : "use binary packages",
"type" : "choice",
- "choices" : ("True", "n")
+ "choices" : true_y_or_n
},
"--usepkgonly": {
"shortopt" : "-K",
"help" : "use only binary packages",
"type" : "choice",
- "choices" : ("True", "n")
+ "choices" : true_y_or_n
},
}
@@ -728,7 +731,7 @@ def parse_opts(tmpcmdline, silent=False):
argument_options["--depclean-lib-check"] = {
"help" : "check for consumers of libraries before removing them",
"type" : "choice",
- "choices" : ("True", "n")
+ "choices" : true_y_or_n
}
from optparse import OptionParser
@@ -761,10 +764,10 @@ def parse_opts(tmpcmdline, silent=False):
myoptions, myargs = parser.parse_args(args=tmpcmdline)
- if myoptions.autounmask in ("True",):
+ if myoptions.autounmask in true_y:
myoptions.autounmask = True
- if myoptions.buildpkg in ("True",):
+ if myoptions.buildpkg in true_y:
myoptions.buildpkg = True
else:
myoptions.buildpkg = None
@@ -773,21 +776,21 @@ def parse_opts(tmpcmdline, silent=False):
myoptions.reinstall = "changed-use"
myoptions.changed_use = False
- if myoptions.deselect == "True":
+ if myoptions.deselect in true_y:
myoptions.deselect = True
- if myoptions.binpkg_respect_use in ("y", "True",):
+ if myoptions.binpkg_respect_use in true_y:
myoptions.binpkg_respect_use = True
else:
myoptions.binpkg_respect_use = None
- if myoptions.complete_graph in ("y", "True",):
+ if myoptions.complete_graph in true_y:
myoptions.complete_graph = True
else:
myoptions.complete_graph = None
if _ENABLE_DYN_LINK_MAP:
- if myoptions.depclean_lib_check in ("True",):
+ if myoptions.depclean_lib_check in true_y:
myoptions.depclean_lib_check = True
if myoptions.exclude:
@@ -815,40 +818,40 @@ def parse_opts(tmpcmdline, silent=False):
parser.error("Invalid Atom(s) in --exclude parameter: '%s' (only package names and slot atoms (with wildcards) allowed)\n" % \
(",".join(bad_atoms),))
- if myoptions.fail_clean == "True":
+ if myoptions.fail_clean in true_y:
myoptions.fail_clean = True
- if myoptions.getbinpkg in ("True",):
+ if myoptions.getbinpkg in true_y:
myoptions.getbinpkg = True
else:
myoptions.getbinpkg = None
- if myoptions.getbinpkgonly in ("True",):
+ if myoptions.getbinpkgonly in true_y:
myoptions.getbinpkgonly = True
else:
myoptions.getbinpkgonly = None
- if myoptions.keep_going in ("True",):
+ if myoptions.keep_going in true_y:
myoptions.keep_going = True
else:
myoptions.keep_going = None
- if myoptions.package_moves in ("True",):
+ if myoptions.package_moves in true_y:
myoptions.package_moves = True
- if myoptions.rebuilt_binaries in ("True",):
+ if myoptions.rebuilt_binaries in true_y:
myoptions.rebuilt_binaries = True
- if myoptions.root_deps == "True":
+ if myoptions.root_deps in true_y:
myoptions.root_deps = True
- if myoptions.select == "True":
+ if myoptions.select in true_y:
myoptions.select = True
myoptions.oneshot = False
elif myoptions.select == "n":
myoptions.oneshot = True
- if myoptions.selective == "True":
+ if myoptions.selective in true_y:
myoptions.selective = True
if myoptions.backtrack is not None:
@@ -931,17 +934,17 @@ def parse_opts(tmpcmdline, silent=False):
myoptions.rebuilt_binaries_timestamp = rebuilt_binaries_timestamp
- if myoptions.use_ebuild_visibility in ("True",):
+ if myoptions.use_ebuild_visibility in true_y:
myoptions.use_ebuild_visibility = True
else:
myoptions.use_ebuild_visibility = None
- if myoptions.usepkg in ("True",):
+ if myoptions.usepkg in true_y:
myoptions.usepkg = True
else:
myoptions.usepkg = None
- if myoptions.usepkgonly in ("True",):
+ if myoptions.usepkgonly in true_y:
myoptions.usepkgonly = True
else:
myoptions.usepkgonly = None