_slot_operator_update_probe: handle slot conflict
authorZac Medico <zmedico@gentoo.org>
Thu, 14 Feb 2013 03:40:19 +0000 (19:40 -0800)
committerZac Medico <zmedico@gentoo.org>
Thu, 14 Feb 2013 03:40:19 +0000 (19:40 -0800)
The "insignificant change" detection from commit
0240b8b754ab5f642c50c863d4bec1dc3636ba29 is only valid when we are
not trying to resolve a slot conflict (see bug #457142).

pym/_emerge/depgraph.py

index 085e6cbe515b88edd11973a7a6ecfbaad4df2abb..e0ea895a76e74ae012e10a06fb51767682fb7a63 100644 (file)
@@ -1028,7 +1028,7 @@ class depgraph(object):
                                dep = Dependency(atom=atom, child=other_pkg,
                                        parent=parent, root=pkg.root)
 
-                               if self._slot_operator_update_probe(dep):
+                               if self._slot_operator_update_probe(dep, slot_conflict=True):
                                        self._slot_operator_update_backtrack(dep)
                                        found_update = True
 
@@ -1154,7 +1154,8 @@ class depgraph(object):
 
                self._dynamic_config._need_restart = True
 
-       def _slot_operator_update_probe(self, dep, new_child_slot=False):
+       def _slot_operator_update_probe(self, dep, new_child_slot=False,
+               slot_conflict=False):
                """
                slot/sub-slot := operators tend to prevent updates from getting pulled in,
                since installed packages pull in packages with the slot/sub-slot that they
@@ -1227,7 +1228,8 @@ class depgraph(object):
                                                                continue
 
                                        insignificant = False
-                                       if selective and \
+                                       if not slot_conflict and \
+                                               selective and \
                                                dep.parent.installed and \
                                                dep.child.installed and \
                                                dep.parent.cpv == replacement_parent.cpv and \
@@ -1235,7 +1237,8 @@ class depgraph(object):
                                                # Then can happen if the child's sub-slot changed
                                                # without a revision bump. The sub-slot change is
                                                # considered insignificant until one of its parent
-                                               # packages needs to be rebuilt.
+                                               # packages needs to be rebuilt (which may trigger a
+                                               # slot conflict).
                                                insignificant = True
 
                                        if debug: