Scheduler: free unneeded uninstall task from mem v2.2.0_alpha14
authorZac Medico <zmedico@gentoo.org>
Fri, 7 Jan 2011 00:34:17 +0000 (16:34 -0800)
committerZac Medico <zmedico@gentoo.org>
Fri, 7 Jan 2011 00:34:17 +0000 (16:34 -0800)
pym/_emerge/Scheduler.py

index eb70e80ddb6a6b7e08ac40acdf751ea3b8e1f11e..f637dd075a8cbda93a98775696b0a56f1210b89c 100644 (file)
@@ -1410,7 +1410,11 @@ class Scheduler(PollScheduler):
                if pkg_to_replace is not None:
                        # When a package is replaced, mark it's uninstall
                        # task complete (if any).
-                       self._task_complete(pkg_to_replace)
+                       if self._digraph is not None and \
+                               pkg_to_replace in self._digraph:
+                               self._task_complete(pkg_to_replace)
+                       else:
+                               self._pkg_cache.pop(pkg_to_replace, None)
 
                if pkg.installed:
                        return