summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-07-15 23:16:20 -0700
committerZac Medico <zmedico@gentoo.org>2011-07-15 23:16:20 -0700
commitf07f8386e945b48358c11c121960e4833c539752 (patch)
tree89cf1b6a0192f7222eb2aea77f538e83a68130d0
parent6620e74643e0baf040488557b1fff7273654a44d (diff)
downloadportage-f07f8386e945b48358c11c121960e4833c539752.tar.gz
portage-f07f8386e945b48358c11c121960e4833c539752.tar.bz2
portage-f07f8386e945b48358c11c121960e4833c539752.zip
EbuildBuild: use fetch queue to cap fetch threads
This will fix bug #375331.
-rw-r--r--pym/_emerge/EbuildBuild.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/pym/_emerge/EbuildBuild.py b/pym/_emerge/EbuildBuild.py
index a678ede04..b6beb495b 100644
--- a/pym/_emerge/EbuildBuild.py
+++ b/pym/_emerge/EbuildBuild.py
@@ -172,7 +172,11 @@ class EbuildBuild(CompositeTask):
logfile=self.settings.get('PORTAGE_LOG_FILE'),
pkg=self.pkg, scheduler=self.scheduler)
- self._start_task(fetcher, self._fetch_exit)
+ # Allow the Scheduler's fetch queue to control the
+ # number of concurrent fetchers.
+ fetcher.addExitListener(self._fetch_exit)
+ self._task_queued(fetcher)
+ self.scheduler.fetch.schedule(fetcher)
def _fetch_exit(self, fetcher):