Scheduler: free unneeded uninstall task from mem v2.1.9.30
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:35:43 +0000 (16:35 -0800)
pym/_emerge/Scheduler.py

index da17eedabf6721b6f447e29bd63633c683057c43..11589ff40a265293dffebfbe6da8cb3b96feafa9 100644 (file)
@@ -1408,7 +1408,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