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

svn path=/main/branches/2.1.2/; revision=10107

bin/emerge

index 2eb370f020c1a76ac534d10bb18877d596d187c8..22523818a78ddafeed1815083f3204b44cbe601a 100755 (executable)
@@ -3372,6 +3372,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]