In depgraph.validate_blockers(), discard any "uninstall" tasks scheduled
authorZac Medico <zmedico@gentoo.org>
Fri, 2 May 2008 21:09:20 +0000 (21:09 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 2 May 2008 21:09:20 +0000 (21:09 -0000)
by previous calls, since those tasks may not make sense given the current
graph state.

svn path=/main/trunk/; revision=10106

pym/_emerge/__init__.py

index b306f10856bdefa202ebebaa49f2a8e2976f80bf..0160f6d02bec6c64afdbebf75490539c6e83d388 100644 (file)
@@ -3225,6 +3225,14 @@ class depgraph(object):
                                blocker_cache.flush()
                                del blocker_cache
 
+               # Discard any "uninstall" tasks scheduled by previous calls
+               # to this method, since those tasks may not make sense given
+               # the current graph state.
+               previous_uninstall_tasks = self._blocker_uninstalls.leaf_nodes()
+               if previous_uninstall_tasks:
+                       self._blocker_uninstalls = digraph()
+                       self.digraph.difference_update(previous_uninstall_tasks)
+
                for blocker in self._blocker_parents.leaf_nodes():
                        self.spinner.update()
                        root_config = self.roots[blocker.root]