From 6a4e3f8f2b773c69173a4c9b62f03bb8609a49e5 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sun, 13 Feb 2011 20:57:57 -0800 Subject: get_dep_chain: fix unsatisfied_dependency logic Always prefer parents for which the parent atom is unsatisfied by the child node. This seems to be the intention of the code, though it may not have behaved correctly due to continuation of the parent loop. --- pym/_emerge/depgraph.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'pym/_emerge') diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index 1b76f5323..160299b31 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -2377,6 +2377,7 @@ class depgraph(object): selected_parent = None parent_arg = None parent_merge = None + parent_unsatisfied = None for parent in self._dynamic_config.digraph.parent_nodes(node): if parent in traversed_nodes: @@ -2395,12 +2396,14 @@ class depgraph(object): if parent is ppkg: atom_set = InternalPackageSet(initial_atoms=(atom,)) if not atom_set.findAtomForPackage(start_node): - selected_parent = parent + parent_unsatisfied = parent break else: selected_parent = parent - if parent_merge is not None: + if parent_unsatisfied is not None: + selected_parent = parent_unsatisfied + elif parent_merge is not None: # Prefer parent in the merge list (bug #354747). selected_parent = parent_merge elif parent_arg is not None: -- cgit v1.2.3-1-g7c22