diff options
-rw-r--r-- | pym/_emerge/Scheduler.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pym/_emerge/Scheduler.py b/pym/_emerge/Scheduler.py index eb70e80dd..f637dd075 100644 --- a/pym/_emerge/Scheduler.py +++ b/pym/_emerge/Scheduler.py @@ -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 |