summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-05-02 12:34:21 -0700
committerZac Medico <zmedico@gentoo.org>2011-05-02 12:34:21 -0700
commit5f9dedaa14bbb704e055f2fa616821b79f9c6914 (patch)
tree3b16c3620ae37dcf5f3c3d6773281304b7a5c03e /pym
parentc522bc7e2c2c116a061eca24a1697841947bc433 (diff)
downloadportage-5f9dedaa14bbb704e055f2fa616821b79f9c6914.tar.gz
portage-5f9dedaa14bbb704e055f2fa616821b79f9c6914.tar.bz2
portage-5f9dedaa14bbb704e055f2fa616821b79f9c6914.zip
depgraph: autounmask account for optional deps
Diffstat (limited to 'pym')
-rw-r--r--pym/_emerge/depgraph.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
index 5183b27f6..dd1b5e843 100644
--- a/pym/_emerge/depgraph.py
+++ b/pym/_emerge/depgraph.py
@@ -1375,6 +1375,20 @@ class depgraph(object):
def _add_pkg_dep_string(self, pkg, dep_root, dep_priority, dep_string,
allow_unsatisfied, ignore_blockers=False):
+ _autounmask_backup = self._dynamic_config._autounmask
+ if dep_priority.optional or dep_priority.ignored:
+ # Temporarily disable autounmask for deps that
+ # don't necessarily need to be satisfied.
+ self._dynamic_config._autounmask = False
+ try:
+ return self._wrapped_add_pkg_dep_string(
+ pkg, dep_root, dep_priority, dep_string,
+ allow_unsatisfied, ignore_blockers=ignore_blockers)
+ finally:
+ self._dynamic_config._autounmask = _autounmask_backup
+
+ def _wrapped_add_pkg_dep_string(self, pkg, dep_root, dep_priority,
+ dep_string, allow_unsatisfied, ignore_blockers=False):
depth = pkg.depth + 1
deep = self._dynamic_config.myparams.get("deep", 0)
recurse_satisfied = deep is True or depth <= deep