1 |
commit: 5f9dedaa14bbb704e055f2fa616821b79f9c6914 |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon May 2 19:34:21 2011 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon May 2 19:34:21 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=5f9dedaa |
7 |
|
8 |
depgraph: autounmask account for optional deps |
9 |
|
10 |
--- |
11 |
pym/_emerge/depgraph.py | 14 ++++++++++++++ |
12 |
1 files changed, 14 insertions(+), 0 deletions(-) |
13 |
|
14 |
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py |
15 |
index 5183b27..dd1b5e8 100644 |
16 |
--- a/pym/_emerge/depgraph.py |
17 |
+++ b/pym/_emerge/depgraph.py |
18 |
@@ -1375,6 +1375,20 @@ class depgraph(object): |
19 |
|
20 |
def _add_pkg_dep_string(self, pkg, dep_root, dep_priority, dep_string, |
21 |
allow_unsatisfied, ignore_blockers=False): |
22 |
+ _autounmask_backup = self._dynamic_config._autounmask |
23 |
+ if dep_priority.optional or dep_priority.ignored: |
24 |
+ # Temporarily disable autounmask for deps that |
25 |
+ # don't necessarily need to be satisfied. |
26 |
+ self._dynamic_config._autounmask = False |
27 |
+ try: |
28 |
+ return self._wrapped_add_pkg_dep_string( |
29 |
+ pkg, dep_root, dep_priority, dep_string, |
30 |
+ allow_unsatisfied, ignore_blockers=ignore_blockers) |
31 |
+ finally: |
32 |
+ self._dynamic_config._autounmask = _autounmask_backup |
33 |
+ |
34 |
+ def _wrapped_add_pkg_dep_string(self, pkg, dep_root, dep_priority, |
35 |
+ dep_string, allow_unsatisfied, ignore_blockers=False): |
36 |
depth = pkg.depth + 1 |
37 |
deep = self._dynamic_config.myparams.get("deep", 0) |
38 |
recurse_satisfied = deep is True or depth <= deep |