From 453684d09ece494745a7f37627b3f6288ece9715 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sun, 3 Oct 2010 18:05:48 -0700 Subject: Bug #339606 - Fix broken 'missed update' message. --- pym/_emerge/depgraph.py | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'pym') diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index 7f5d16864..82433e8d9 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -875,17 +875,29 @@ class depgraph(object): backtrack_data = [] all_parents = set() - for node, other_node in (existing_node, pkg), (pkg, existing_node): + # HACK: The ordering of backtrack_data can make + # a difference here. We choose an order such that + # the backtracker will first explore the choice with + # existing_node masked. The backtracker reverses the + # order twice, so the order it uses is the order shown + # here (the net result of two reversals is the same as + # no reversal). See bug #339606. + for to_be_selected, to_be_masked in (pkg, existing_node), (existing_node, pkg): + # For missed update messages, find out which + # atoms matched to_be_selected that did not + # match to_be_masked. parent_atoms = \ - self._dynamic_config._parent_atoms.get(node, set()) + self._dynamic_config._parent_atoms.get(to_be_selected, set()) if parent_atoms: conflict_atoms = self._dynamic_config._slot_conflict_parent_atoms.intersection(parent_atoms) if conflict_atoms: parent_atoms = conflict_atoms all_parents.update(parent_atoms) - if node < other_node: + if to_be_selected >= to_be_masked: + # We only care about the parent atoms + # when they trigger a downgrade. parent_atoms = set() - backtrack_data.append((node, parent_atoms)) + backtrack_data.append((to_be_masked, parent_atoms)) self._dynamic_config._backtrack_infos["slot conflict"] = backtrack_data self._dynamic_config._need_restart = True -- cgit v1.2.3-1-g7c22