Scheduler: fix _running_tasks for uninstalls v2.2.0_alpha46
authorZac Medico <zmedico@gentoo.org>
Tue, 19 Jul 2011 20:23:35 +0000 (13:23 -0700)
committerZac Medico <zmedico@gentoo.org>
Tue, 19 Jul 2011 20:23:35 +0000 (13:23 -0700)
pym/_emerge/Scheduler.py

index 1b3a03421aaa6e309b05dad221ba41964b747140..d13e62266abe5ee3cf39b008e366b04cf37f9cca 100644 (file)
@@ -1661,10 +1661,10 @@ class Scheduler(PollScheduler):
                                self._pkg_count.curval += 1
 
                        task = self._task(pkg)
-                       self._running_tasks[id(task)] = task
 
                        if pkg.installed:
                                merge = PackageMerge(merge=task)
+                               self._running_tasks[id(merge)] = merge
                                merge.addExitListener(self._merge_exit)
                                self._task_queues.merge.addFront(merge)
 
@@ -1672,6 +1672,7 @@ class Scheduler(PollScheduler):
                                self._jobs += 1
                                self._previous_job_start_time = time.time()
                                self._status_display.running = self._jobs
+                               self._running_tasks[id(task)] = task
                                task.addExitListener(self._extract_exit)
                                self._task_queues.jobs.add(task)
 
@@ -1679,6 +1680,7 @@ class Scheduler(PollScheduler):
                                self._jobs += 1
                                self._previous_job_start_time = time.time()
                                self._status_display.running = self._jobs
+                               self._running_tasks[id(task)] = task
                                task.addExitListener(self._build_exit)
                                self._task_queues.jobs.add(task)