1 |
This handles a case which occurs when |
2 |
_solve_non_slot_operator_slot_conflicts calls _create_graph. In this |
3 |
case, ignore unsatisfied deps for installed packages only if their depth |
4 |
is beyond the depth requested by the user and the dep was initially |
5 |
unsatisfied (not broken by a slot conflict in the current graph). |
6 |
|
7 |
X-Gentoo-Bug: 520950 |
8 |
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=520950 |
9 |
--- |
10 |
pym/_emerge/depgraph.py | 29 +++++++++++++++++++++++++---- |
11 |
1 file changed, 25 insertions(+), 4 deletions(-) |
12 |
|
13 |
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py |
14 |
index d6cd24d..f8ac1ef 100644 |
15 |
--- a/pym/_emerge/depgraph.py |
16 |
+++ b/pym/_emerge/depgraph.py |
17 |
@@ -107,7 +107,7 @@ def _wildcard_set(atoms): |
18 |
|
19 |
class _frozen_depgraph_config(object): |
20 |
|
21 |
- def __init__(self, settings, trees, myopts, spinner): |
22 |
+ def __init__(self, settings, trees, myopts, params, spinner): |
23 |
self.settings = settings |
24 |
self.target_root = settings["EROOT"] |
25 |
self.myopts = myopts |
26 |
@@ -115,6 +115,7 @@ class _frozen_depgraph_config(object): |
27 |
if settings.get("PORTAGE_DEBUG", "") == "1": |
28 |
self.edebug = 1 |
29 |
self.spinner = spinner |
30 |
+ self.requested_depth = params.get("deep", 0) |
31 |
self._running_root = trees[trees._running_eroot]["root_config"] |
32 |
self.pkgsettings = {} |
33 |
self.trees = {} |
34 |
@@ -508,7 +509,7 @@ class depgraph(object): |
35 |
frozen_config=None, backtrack_parameters=BacktrackParameter(), allow_backtracking=False): |
36 |
if frozen_config is None: |
37 |
frozen_config = _frozen_depgraph_config(settings, trees, |
38 |
- myopts, spinner) |
39 |
+ myopts, myparams, spinner) |
40 |
self._frozen_config = frozen_config |
41 |
self._dynamic_config = _dynamic_depgraph_config(self, myparams, |
42 |
allow_backtracking, backtrack_parameters) |
43 |
@@ -2167,6 +2168,26 @@ class depgraph(object): |
44 |
if allow_unsatisfied: |
45 |
self._dynamic_config._unsatisfied_deps.append(dep) |
46 |
return 1 |
47 |
+ |
48 |
+ # The following case occurs when |
49 |
+ # _solve_non_slot_operator_slot_conflicts calls |
50 |
+ # _create_graph. In this case, ignore unsatisfied deps for |
51 |
+ # installed packages only if their depth is beyond the depth |
52 |
+ # requested by the user and the dep was initially |
53 |
+ # unsatisfied (not broken by a slot conflict in the current |
54 |
+ # graph). See bug #520950. |
55 |
+ if (self._dynamic_config._complete_mode and |
56 |
+ isinstance(dep.parent, Package) and |
57 |
+ dep.parent.installed and |
58 |
+ (self._frozen_config.requested_depth is True or |
59 |
+ (dep.parent.depth is None or |
60 |
+ dep.parent.depth >= self._frozen_config.requested_depth))): |
61 |
+ inst_pkg, in_graph = \ |
62 |
+ self._select_pkg_from_installed(dep.root, dep.atom) |
63 |
+ if inst_pkg is None: |
64 |
+ self._dynamic_config._initially_unsatisfied_deps.append(dep) |
65 |
+ return 1 |
66 |
+ |
67 |
self._dynamic_config._unsatisfied_deps_for_display.append( |
68 |
((dep.root, dep.atom), {"myparent":dep.parent})) |
69 |
|
70 |
@@ -8487,7 +8508,7 @@ def _backtrack_depgraph(settings, trees, myopts, myparams, myaction, myfiles, sp |
71 |
backtracked = 0 |
72 |
|
73 |
frozen_config = _frozen_depgraph_config(settings, trees, |
74 |
- myopts, spinner) |
75 |
+ myopts, myparams, spinner) |
76 |
|
77 |
while backtracker: |
78 |
|
79 |
@@ -8569,7 +8590,7 @@ def _resume_depgraph(settings, trees, mtimedb, myopts, myparams, spinner): |
80 |
mergelist = mtimedb["resume"]["mergelist"] |
81 |
dropped_tasks = {} |
82 |
frozen_config = _frozen_depgraph_config(settings, trees, |
83 |
- myopts, spinner) |
84 |
+ myopts, myparams, spinner) |
85 |
while True: |
86 |
mydepgraph = depgraph(settings, trees, |
87 |
myopts, myparams, spinner, frozen_config=frozen_config) |
88 |
-- |
89 |
1.8.1.5 |