From ecb5f8ca5b5c30038480ec885fd453d0297b283c Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 17 Feb 2009 23:53:36 +0000 Subject: [PATCH] Bug #253904 - Add a lookahead mechanism inside depgraph._dep_check_composite_db._visible() which masks package choices that are likely to trigger slot conflicts. Thanks to Vlastimil Babka for the suggestion. svn path=/main/trunk/; revision=12623 --- pym/_emerge/__init__.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index e63da7d5e..72be73e7c 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -8897,6 +8897,20 @@ class depgraph(object): return False except portage.exception.InvalidDependString: pass + in_graph = self._depgraph._slot_pkg_map[ + self._root].get(pkg.slot_atom) + if in_graph is None: + # Mask choices for packages which are not the highest visible + # version within their slot (since they usually trigger slot + # conflicts). + highest_visible, in_graph = self._depgraph._select_package( + self._root, pkg.slot_atom) + if pkg != highest_visible: + return False + elif in_graph != pkg: + # Mask choices for packages that would trigger a slot + # conflict with a previously selected package. + return False return True def _dep_expand(self, atom): -- 2.26.2