summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-02-13 20:57:57 -0800
committerZac Medico <zmedico@gentoo.org>2011-02-13 20:57:57 -0800
commit080ee08b577177342b42a7bb2ec22555f0d1d259 (patch)
tree6562306f0fc62006b4f5e562e72a20d979c06803 /pym
parent334af57e0511842a3b38db091f2aa33e07615729 (diff)
downloadportage-080ee08b577177342b42a7bb2ec22555f0d1d259.tar.gz
portage-080ee08b577177342b42a7bb2ec22555f0d1d259.tar.bz2
portage-080ee08b577177342b42a7bb2ec22555f0d1d259.zip
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.
Diffstat (limited to 'pym')
-rw-r--r--pym/_emerge/depgraph.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
index ef4d1f02d..d6c74e4c7 100644
--- a/pym/_emerge/depgraph.py
+++ b/pym/_emerge/depgraph.py
@@ -2363,6 +2363,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:
@@ -2381,12 +2382,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: