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 |
[PATCH v2] fixes it to handle soname atoms correctly |
19 |
|
20 |
pym/_emerge/depgraph.py | 17 ++++++++++++++--- |
21 |
1 file changed, 14 insertions(+), 3 deletions(-) |
22 |
|
23 |
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py |
24 |
index ad94fb7..511944c 100644 |
25 |
--- a/pym/_emerge/depgraph.py |
26 |
+++ b/pym/_emerge/depgraph.py |
27 |
@@ -1895,7 +1895,9 @@ class depgraph(object): |
28 |
all_candidate_pkgs = None |
29 |
|
30 |
for atom in atoms: |
31 |
- atom_not_selected = False |
32 |
+ # The _select_atoms_probe method is expensive, so initialization |
33 |
+ # of this variable is only permformed on demand. |
34 |
+ atom_not_selected = None |
35 |
|
36 |
if not atom.package: |
37 |
unevaluated_atom = None |
38 |
@@ -1977,8 +1979,8 @@ class depgraph(object): |
39 |
if selected_atoms is None: |
40 |
selected_atoms = self._select_atoms_probe( |
41 |
dep.child.root, replacement_parent) |
42 |
- if unevaluated_atom not in selected_atoms: |
43 |
- atom_not_selected = True |
44 |
+ atom_not_selected = unevaluated_atom not in selected_atoms |
45 |
+ if atom_not_selected: |
46 |
break |
47 |
|
48 |
if not insignificant and \ |
49 |
@@ -1989,6 +1991,15 @@ class depgraph(object): |
50 |
(pkg, unevaluated_atom or atom)) |
51 |
candidate_pkgs.append(pkg) |
52 |
|
53 |
+ # When unevaluated_atom is None, it means that atom is |
54 |
+ # an soname atom which is unconditionally selected, and |
55 |
+ # _select_atoms_probe is not applicable. |
56 |
+ if atom_not_selected is None and unevaluated_atom is not None: |
57 |
+ if selected_atoms is None: |
58 |
+ selected_atoms = self._select_atoms_probe( |
59 |
+ dep.child.root, replacement_parent) |
60 |
+ atom_not_selected = unevaluated_atom not in selected_atoms |
61 |
+ |
62 |
if atom_not_selected: |
63 |
continue |
64 |
replacement_candidates.append(candidate_pkg_atoms) |
65 |
-- |
66 |
2.10.2 |