diff options
author | Zac Medico <zmedico@gentoo.org> | 2011-10-10 11:01:36 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2011-10-10 11:01:36 -0700 |
commit | f8e0c75e0952d04cb518ad0914ad440f1b43f52d (patch) | |
tree | cbaf8b62c650c418e7cdd5ad29ef45bd9b1f0458 /pym/_emerge/FakeVartree.py | |
parent | 1a00bb2a24bed702ab0703540130d19d669191d0 (diff) | |
download | portage-f8e0c75e0952d04cb518ad0914ad440f1b43f52d.tar.gz portage-f8e0c75e0952d04cb518ad0914ad440f1b43f52d.tar.bz2 portage-f8e0c75e0952d04cb518ad0914ad440f1b43f52d.zip |
Add emerge --dynamic-deps <y|n> option.
This makes it possible to disable the dynamic dependency updates that
FakeVartree performs by default.
WARNING: 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 make.conf(5). Alternatively, in order to manually apply
package moves, run `emaint --fix moveinst` after each emerge --sync
operation (see emaint(1)).
Diffstat (limited to 'pym/_emerge/FakeVartree.py')
-rw-r--r-- | pym/_emerge/FakeVartree.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/pym/_emerge/FakeVartree.py b/pym/_emerge/FakeVartree.py index a11966f89..a9c1b90e0 100644 --- a/pym/_emerge/FakeVartree.py +++ b/pym/_emerge/FakeVartree.py @@ -37,8 +37,10 @@ class FakeVartree(vartree): 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 @@ -60,7 +62,8 @@ class FakeVartree(vartree): # 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() |