This will fix bug #346349 and bug #344799.
\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
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
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,
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
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
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
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
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.
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
\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.
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
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 " + \
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 " + \
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," + \
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" + \
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 " + \
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 " + \
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")
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 " + \
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. " + \
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 " + \
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 " + \
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. " + \
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")
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.")
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,
# 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[:]
])
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": {
"shortopt" : "-b",
"help" : "build binary packages",
"type" : "choice",
- "choices" : ("True", "n")
+ "choices" : true_y_or_n
},
"--config-root": {
"--complete-graph": {
"help" : "completely account for all known dependencies",
"type" : "choice",
- "choices" : ("True", "n")
+ "choices" : true_y_or_n
},
"--deep": {
"--deselect": {
"help" : "remove atoms/sets from the world file",
"type" : "choice",
- "choices" : ("True", "n")
+ "choices" : true_y_or_n
},
"--exclude": {
"--fail-clean": {
"help" : "clean temp files after build failure",
"type" : "choice",
- "choices" : ("True", "n")
+ "choices" : true_y_or_n
},
"--jobs": {
"--keep-going": {
"help" : "continue as much as possible after an error",
"type" : "choice",
- "choices" : ("True", "n")
+ "choices" : true_y_or_n
},
"--load-average": {
"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": {
"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
},
}
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
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
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:
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:
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