Results may vary, but the general outcome is a reduced or condensed
output from portage's displays.
.TP
+.BR "\-\-rdeps\-only"
+Discard all build\-time dependencies. This option is commonly used together
+with \fBROOT\fR and it should not be enabled under normal circumstances. For
+currently supported \fBEAPI\fR values, the dependencies specified in the
+\fBDEPEND\fR variable are discarded. However, behavior may change for new
+\fBEAPI\fRs when related extensions are added in the future.
+.TP
.BR "\-\-reinstall changed\-use"
Tells emerge to include installed packages where USE flags have
changed since installation. Unlike \fB\-\-newuse\fR, this option does
not trigger reinstallation when flags that the user has not
enabled are added or removed.
.TP
+.BR \-\-root=DIR
+Set the \fBROOT\fR environment variable.
+.TP
+.BR "\-\-root\-deps"
+Install build\-time dependencies to \fBROOT\fR instead of /. This option
+should not be enabled under normal circumstances. For currently supported
+\fBEAPI\fR values, the dependencies specified in the \fBDEPEND\fR variable
+are used. However, behavior may change for new
+\fBEAPI\fRs when related extensions are added in the future.
+.TP
.BR "\-\-skipfirst"
This option is only valid when used with \fB\-\-resume\fR. It removes the
first package in the resume list. Dependencies are recalculated for
.TP
\fBROOT\fR = \fI[path]\fR
Use \fBROOT\fR to specify the target root filesystem to be used for
-merging packages or ebuilds. This variable can be set in \fBmake.conf\fR(5).
+merging packages or ebuilds. This variable can be set via the \fB\-\-root\fR
+option or in \fBmake.conf\fR(5) (the command line overrides other settings).
.br
Defaults to /.
.TP
"--nospinner", "--oneshot",
"--onlydeps", "--pretend",
"--quiet", "--resume",
+"--rdeps-only", "--root-deps",
"--searchdesc", "--selective",
"--skipfirst",
"--tree",
portdb = root_config.trees["porttree"].dbapi
ebuild_path = portdb.findname(pkg.cpv)
debug = settings.get("PORTAGE_DEBUG") == "1"
- portage.prepare_build_dirs(self.pkg.root, self.settings, 0)
-
retval = portage.doebuild(ebuild_path, "fetch",
self.settings["ROOT"], self.settings, debug=debug,
listonly=self.pretend, fetchonly=1, fetchall=self.fetch_all,
if removal_action and self.myopts.get("--with-bdeps", "y") == "n":
edepend["DEPEND"] = ""
+ bdeps_root = "/"
+ if self.target_root != "/":
+ if "--root-deps" in self.myopts:
+ bdeps_root = myroot
+ if "--rdeps-only" in self.myopts:
+ bdeps_root = "/"
+ edepend["DEPEND"] = ""
+
deps = (
- ("/", edepend["DEPEND"],
+ (bdeps_root, edepend["DEPEND"],
self._priority(buildtime=(not bdeps_optional),
optional=bdeps_optional)),
(myroot, edepend["RDEPEND"], self._priority(runtime=True)),
old_use = vardb.aux_get(cpv, ["USE"])[0].split()
old_iuse = set(filter_iuse_defaults(
vardb.aux_get(cpv, ["IUSE"])[0].split()))
- cur_use = pkgsettings["PORTAGE_USE"].split()
+ cur_use = pkg.use.enabled
cur_iuse = pkg.iuse.all
reinstall_for_flags = \
self._reinstall_for_flags(
not self._have_new_virt(blocker.root, blocker.cp):
provider_virtual = True
+ # Use this to check PROVIDE for each matched package
+ # when necessary.
+ atom_set = InternalPackageSet(
+ initial_atoms=[blocker.atom])
+
if provider_virtual:
atoms = []
for provider_entry in virtuals[blocker.cp]:
else:
atoms = [blocker.atom]
- blocked_initial = []
+ blocked_initial = set()
for atom in atoms:
- blocked_initial.extend(initial_db.match_pkgs(atom))
+ for pkg in initial_db.match_pkgs(atom):
+ if atom_set.findAtomForPackage(pkg):
+ blocked_initial.add(pkg)
- blocked_final = []
+ blocked_final = set()
for atom in atoms:
- blocked_final.extend(final_db.match_pkgs(atom))
+ for pkg in final_db.match_pkgs(atom):
+ if atom_set.findAtomForPackage(pkg):
+ blocked_final.add(pkg)
if not blocked_initial and not blocked_final:
parent_pkgs = self._blocker_parents.parent_nodes(blocker)
"help":"specify conditions to trigger package reinstallation",
"type":"choice",
"choices":["changed-use"]
- }
+ },
+ "--root": {
+ "help" : "specify the target root filesystem for merging packages",
+ "action" : "store"
+ },
}
from optparse import OptionParser
os.environ["PORTAGE_DEBUG"] = "1"
if "--config-root" in myopts:
os.environ["PORTAGE_CONFIGROOT"] = myopts["--config-root"]
+ if "--root" in myopts:
+ os.environ["ROOT"] = myopts["--root"]
# Portage needs to ensure a sane umask for the files it creates.
os.umask(022)
for line in wrap(desc, desc_width):
print desc_indent + line
print
+ print " "+green("--config-root=DIR")
+ desc = "Set the PORTAGE_CONFIGROOT environment variable " + \
+ "which is documented in the emerge(1) man page."
+ for line in wrap(desc, desc_width):
+ print desc_indent + line
+ print
print " "+green("--debug")+" ("+green("-d")+" short option)"
print " Tell emerge to run the ebuild command in --debug mode. In this"
print " mode, the bash build environment will run with the -x option,"
print " Effects vary, but the general outcome is a reduced or condensed"
print " output from portage's displays."
print
+ print " "+green("--rdeps-only")
+ desc = "Discard all build-time dependencies. This option is commonly used together " + \
+ "with ROOT and it should not be enabled under normal circumstances. For " + \
+ "currently supported EAPI values, the dependencies specified in the " + \
+ "DEPEND variable are discarded. However, behavior may change for new " + \
+ "EAPIs when related extensions are added in the future."
+ for line in wrap(desc, desc_width):
+ print desc_indent + line
+ print
print " "+green("--reinstall ") + turquoise("changed-use")
print " Tells emerge to include installed packages where USE flags have"
print " changed since installation. Unlike --newuse, this option does"
print " not trigger reinstallation when flags that the user has not"
print " enabled are added or removed."
print
+ print " "+green("--root=DIR")
+ desc = "Set the ROOT environment variable " + \
+ "which is documented in the emerge(1) man page."
+ for line in wrap(desc, desc_width):
+ print desc_indent + line
+ print
+ print " "+green("--root-deps")
+ desc = "Install build-time dependencies to ROOT instead of /. This option " + \
+ "should not be enabled under normal circumstances. For currently supported " + \
+ "EAPI values, the dependencies specified in the DEPEND variable " + \
+ "are used. However, behavior may change for new " + \
+ "EAPIs when related extensions are added in the future."
+ for line in wrap(desc, desc_width):
+ print desc_indent + line
+ print
print " "+green("--skipfirst")
desc = "This option is only valid when " + \
"used with --resume. It removes the " + \
logfile=None, returnpid=returnpid)
return retval
+ restrict = set(mysettings.get('PORTAGE_RESTRICT', '').split())
# get possible slot information from the deps file
if mydo == "depend":
writemsg("!!! DEBUG: dbkey: %s\n" % str(dbkey), 2)
mysettings["PF"], myroot, mysettings, vartree=vartree)
# Build directory creation isn't required for any of these.
+ # In the fetch phase, the directory is needed only for RESTRICT=fetch
+ # in order to satisfy the sane $PWD requirement (from bug #239560)
+ # when pkg_nofetch is spawned.
have_build_dirs = False
- if not parallel_fetchonly and mydo not in ("digest", "help", "manifest"):
+ if not parallel_fetchonly and \
+ mydo not in ('digest', 'help', 'manifest') and \
+ not (mydo == 'fetch' and 'fetch' not in restrict):
mystatus = prepare_build_dirs(myroot, mysettings, cleanup)
if mystatus:
return mystatus
return ""
return "[%s]" % (",".join(self.tokens),)
+ def __repr__(self):
+ return "portage.dep._use_dep(%s)" % repr(self.tokens)
+
def evaluate_conditionals(self, use):
"""
Create a new instance with conditionals evaluated.
Pull a listing of USE Dependencies out of a dep atom.
Example usage:
- >>> dep_getusedeps('app-misc/test:3[foo][-bar]')
- ['foo','-bar']
+ >>> dep_getusedeps('app-misc/test:3[foo,-bar]')
+ ('foo', '-bar')
@param depend: The depstring to process
@type depend: String