Fix the _slot_operator_update_probe method to ensure that the atom_not_selected variable is always properly initialized. This problem prevented the method from identifying slot operator rebuild candidates, leading to dependency conflicts and/or missed updates. For example, this may have triggered the missed llvm update reported in bug 611742, since these dependencies from the mesa-17.0.1 ebuild are capable of triggering the problem, when atom_not_selected is not properly set to True for the second atom:
|| ( sys-devel/llvm:4[${MULTILIB_USEDEP}] >=sys-devel/llvm-3.6.0:0[${MULTILIB_USEDEP}] ) X-Gentoo-bug: 612846 X-Gentoo-bug-url: https://bugs.gentoo.org/show_bug.cgi?id=612846 --- pym/_emerge/depgraph.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index ad94fb7..832b472 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -1895,7 +1895,9 @@ class depgraph(object): all_candidate_pkgs = None for atom in atoms: - atom_not_selected = False + # The _select_atoms_probe method is expensive, so initialization + # of this variable is only permformed on demand. + atom_not_selected = None if not atom.package: unevaluated_atom = None @@ -1977,8 +1979,8 @@ class depgraph(object): if selected_atoms is None: selected_atoms = self._select_atoms_probe( dep.child.root, replacement_parent) - if unevaluated_atom not in selected_atoms: - atom_not_selected = True + atom_not_selected = unevaluated_atom not in selected_atoms + if atom_not_selected: break if not insignificant and \ @@ -1989,6 +1991,12 @@ class depgraph(object): (pkg, unevaluated_atom or atom)) candidate_pkgs.append(pkg) + if atom_not_selected is None: + if selected_atoms is None: + selected_atoms = self._select_atoms_probe( + dep.child.root, replacement_parent) + atom_not_selected = unevaluated_atom not in selected_atoms + if atom_not_selected: continue replacement_candidates.append(candidate_pkg_atoms) -- 2.10.2