1 |
Fix the _slot_operator_update_probe method to ensure that the |
2 |
atom_not_selected variable is always properly initialized. This |
3 |
problem prevented the method from identifying slot operator rebuild |
4 |
candidates, leading to dependency conflicts and/or missed updates. |
5 |
For example, this may have triggered the missed llvm update reported |
6 |
in bug 611742, since these dependencies from the mesa-17.0.1 ebuild |
7 |
are capable of triggering the problem, when atom_not_selected is not |
8 |
properly set to True for the second atom: |
9 |
|
10 |
|| ( |
11 |
sys-devel/llvm:4[${MULTILIB_USEDEP}] |
12 |
>=sys-devel/llvm-3.6.0:0[${MULTILIB_USEDEP}] |
13 |
) |
14 |
|
15 |
X-Gentoo-bug: 612846 |
16 |
X-Gentoo-bug-url: https://bugs.gentoo.org/show_bug.cgi?id=612846 |
17 |
--- |
18 |
pym/_emerge/depgraph.py | 14 +++++++++++--- |
19 |
1 file changed, 11 insertions(+), 3 deletions(-) |
20 |
|
21 |
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py |
22 |
index ad94fb7..832b472 100644 |
23 |
--- a/pym/_emerge/depgraph.py |
24 |
+++ b/pym/_emerge/depgraph.py |
25 |
@@ -1895,7 +1895,9 @@ class depgraph(object): |
26 |
all_candidate_pkgs = None |
27 |
|
28 |
for atom in atoms: |
29 |
- atom_not_selected = False |
30 |
+ # The _select_atoms_probe method is expensive, so initialization |
31 |
+ # of this variable is only permformed on demand. |
32 |
+ atom_not_selected = None |
33 |
|
34 |
if not atom.package: |
35 |
unevaluated_atom = None |
36 |
@@ -1977,8 +1979,8 @@ class depgraph(object): |
37 |
if selected_atoms is None: |
38 |
selected_atoms = self._select_atoms_probe( |
39 |
dep.child.root, replacement_parent) |
40 |
- if unevaluated_atom not in selected_atoms: |
41 |
- atom_not_selected = True |
42 |
+ atom_not_selected = unevaluated_atom not in selected_atoms |
43 |
+ if atom_not_selected: |
44 |
break |
45 |
|
46 |
if not insignificant and \ |
47 |
@@ -1989,6 +1991,12 @@ class depgraph(object): |
48 |
(pkg, unevaluated_atom or atom)) |
49 |
candidate_pkgs.append(pkg) |
50 |
|
51 |
+ if atom_not_selected is None: |
52 |
+ if selected_atoms is None: |
53 |
+ selected_atoms = self._select_atoms_probe( |
54 |
+ dep.child.root, replacement_parent) |
55 |
+ atom_not_selected = unevaluated_atom not in selected_atoms |
56 |
+ |
57 |
if atom_not_selected: |
58 |
continue |
59 |
replacement_candidates.append(candidate_pkg_atoms) |
60 |
-- |
61 |
2.10.2 |