diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-07-20 01:16:14 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-07-20 01:16:14 +0000 |
commit | fcb38af4cb2d02c1326520c001779fef6a19051c (patch) | |
tree | 9245a941daa87027dce804002d5e5c2ca32c2122 | |
parent | 3ada8a67e7de6b13be6d247fecebf4ce2bfeb1c7 (diff) | |
download | portage-fcb38af4cb2d02c1326520c001779fef6a19051c.tar.gz portage-fcb38af4cb2d02c1326520c001779fef6a19051c.tar.bz2 portage-fcb38af4cb2d02c1326520c001779fef6a19051c.zip |
* Clean up _schedule_tasks_imp() a bit.
* Make _task() access _background directly instead of as a parameter.
svn path=/main/trunk/; revision=11145
-rw-r--r-- | pym/_emerge/__init__.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index ffeca1f16..c7c398706 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -9463,9 +9463,6 @@ class Scheduler(PollScheduler): @returns: True if tasks remain to schedule, False otherwise. """ - task_queues = self._task_queues - background = self._background - state_change = 0 while True: @@ -9486,25 +9483,28 @@ class Scheduler(PollScheduler): if not pkg.installed: self._pkg_count.curval += 1 - task = self._task(pkg, background) + task = self._task(pkg) if pkg.installed: merge = PackageMerge(merge=task) merge.addExitListener(self._merge_exit) - task_queues.merge.add(merge) + self._task_queues.merge.add(merge) + elif pkg.built: self._jobs += 1 self._status_display.running = self._jobs task.addExitListener(self._extract_exit) - task_queues.jobs.add(task) + self._task_queues.jobs.add(task) + else: self._jobs += 1 self._status_display.running = self._jobs task.addExitListener(self._build_exit) - task_queues.jobs.add(task) + self._task_queues.jobs.add(task) + return (True, state_change) - def _task(self, pkg, background): + def _task(self, pkg): pkg_to_replace = None if pkg.operation != "uninstall": @@ -9516,7 +9516,7 @@ class Scheduler(PollScheduler): "installed", pkg.root_config, installed=True) task = MergeListItem(args_set=self._args_set, - background=background, binpkg_opts=self._binpkg_opts, + background=self._background, binpkg_opts=self._binpkg_opts, build_opts=self._build_opts, emerge_opts=self.myopts, failed_fetches=self._failed_fetches, |