depgraph minimize_children: yield highest version
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
index 35512fc..eea7964 100644
--- a/pym/_emerge/depgraph.py
+++ b/pym/_emerge/depgraph.py
@@ -1431,7 +1431,10 @@
for atom in chain(conflict_atoms, normal_atoms):
child_pkgs = atom_pkg_graph.child_nodes(atom)
- yield (atom, child_pkgs[0])
+ # if more than one child, yield highest version
+ if len(child_pkgs) > 1:
+ child_pkgs.sort()
+ yield (atom, child_pkgs[-1])
def _queue_disjunctive_deps(self, pkg, dep_root, dep_priority, dep_struct):
"""