\fBmake.conf\fR(5), since any libraries that have
consumers will simply be preserved.
.TP
+.BR "\-\-dynamic\-deps < y | n >"
+In dependency calculations, substitute the dependencies of installed
+packages with the dependencies of corresponding unbuilt ebuilds from
+source repositories. This causes the effective dependencies of
+installed packages to vary dynamically when source ebuild dependencies
+are modified. This option is enabled by default.
+
+\fBWARNING:\fR
+If \-\-dynamic\-deps is disabled, then it is necessary to ensure that
+an alternative method is used to handle package moves in dependencies
+of installed packages. Normally, this is handled by
+FEATURES="fixpackages", which is enabled by default and may be
+disabled via \fBmake.conf\fR(5). Alternatively, in order to manually
+apply package moves, run `emaint \-\-fix moveinst` after each
+emerge \-\-sync operation (see \fBemaint\fR(1)).
+.TP
.BR "\-\-emptytree " (\fB\-e\fR)
Reinstalls target atoms and their entire deep
dependency tree, as though no packages are currently
global updates are necessary (updates are performed when necessary if there
is not a matching ebuild in the tree). Instances of this class are not
populated until the sync() method is called."""
- def __init__(self, root_config, pkg_cache=None, pkg_root_config=None):
+ def __init__(self, root_config, pkg_cache=None, pkg_root_config=None,
+ dynamic_deps=True):
self._root_config = root_config
+ self._dynamic_deps = dynamic_deps
if pkg_root_config is None:
pkg_root_config = self._root_config
self._pkg_root_config = pkg_root_config
# metadata. This ensures that the vardb lock is released ASAP, without
# being delayed in case cache generation is triggered.
self._aux_get = self.dbapi.aux_get
- self.dbapi.aux_get = self._aux_get_wrapper
+ if dynamic_deps:
+ self.dbapi.aux_get = self._aux_get_wrapper
self._match = self.dbapi.match
self.dbapi.match = self._match_wrapper
self._aux_get_history = set()
"""
self._set_graph_config(graph_config)
self._blocker_db = {}
+ dynamic_deps = myopts.get("--dynamic-deps", "y") != "n"
for root in self.trees:
if graph_config is None:
fake_vartree = FakeVartree(self.trees[root]["root_config"],
- pkg_cache=self._pkg_cache)
+ pkg_cache=self._pkg_cache, dynamic_deps=dynamic_deps)
fake_vartree.sync()
else:
fake_vartree = graph_config.trees[root]['vartree']
if bdeps is not None:
myparams["bdeps"] = bdeps
+ dynamic_deps = myopts.get("--dynamic-deps")
+ if dynamic_deps is not None:
+ myparams["dynamic_deps"] = dynamic_deps
+
if myaction == "remove":
myparams["remove"] = True
myparams["complete"] = True
# All Package instances
self._pkg_cache = {}
self._highest_license_masked = {}
+ dynamic_deps = myopts.get("--dynamic-deps", "y") != "n"
for myroot in trees:
self.trees[myroot] = {}
# Create a RootConfig instance that references
self.trees[myroot]["vartree"] = \
FakeVartree(trees[myroot]["root_config"],
pkg_cache=self._pkg_cache,
- pkg_root_config=self.roots[myroot])
+ pkg_root_config=self.roots[myroot],
+ dynamic_deps=dynamic_deps)
self.pkgsettings[myroot] = portage.config(
clone=self.trees[myroot]["vartree"].settings)
for myroot in self._frozen_config.trees:
+ dynamic_deps = self._dynamic_config.myparams.get(
+ "dynamic_deps", "y") != "n"
preload_installed_pkgs = \
"--nodeps" not in self._frozen_config.myopts
for pkg in vardb:
self._spinner_update()
- # This triggers metadata updates via FakeVartree.
- vardb.aux_get(pkg.cpv, [])
+ if dynamic_deps:
+ # This causes FakeVartree to update the
+ # Package instance dependencies via
+ # PackageVirtualDbapi.aux_update()
+ vardb.aux_get(pkg.cpv, [])
fakedb.cpv_inject(pkg)
self._dynamic_config._vdb_loaded = True
"choices" : true_y_or_n
},
+ "--dynamic-deps": {
+ "help": "substitute the dependencies of installed packages with the dependencies of unbuilt ebuilds",
+ "type": "choice",
+ "choices": y_or_n
+ },
+
"--exclude": {
"help" :"A space separated list of package names or slot atoms. " + \
"Emerge won't install any ebuild or binary package that " + \