From: Zac Medico Date: Sun, 6 Jan 2013 11:05:58 +0000 (-0800) Subject: ManifestScheduler: fix signal interrupt handling X-Git-Tag: v2.2.0_alpha150~28 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b04d876dc648c4e813ddc5f3036c5d3c94a41b74;p=portage.git ManifestScheduler: fix signal interrupt handling --- diff --git a/pym/portage/package/ebuild/_parallel_manifest/ManifestScheduler.py b/pym/portage/package/ebuild/_parallel_manifest/ManifestScheduler.py index 3dc955684..50c9c7404 100644 --- a/pym/portage/package/ebuild/_parallel_manifest/ManifestScheduler.py +++ b/pym/portage/package/ebuild/_parallel_manifest/ManifestScheduler.py @@ -1,4 +1,4 @@ -# Copyright 2012 Gentoo Foundation +# Copyright 2012-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 import portage @@ -31,7 +31,7 @@ class ManifestScheduler(AsyncScheduler): def _iter_every_cp(self): every_cp = self._portdb.cp_all() - every_cp.sort(reverse=True) + every_cp.reverse() try: while not self._terminated_tasks: yield every_cp.pop() @@ -44,11 +44,13 @@ class ManifestScheduler(AsyncScheduler): disabled_repos = set() for cp in self._cp_iter: - if self._terminated_tasks: + if self._terminated.is_set(): break # We iterate over portdb.porttrees, since it's common to # tweak this attribute in order to adjust repo selection. for mytree in portdb.porttrees: + if self._terminated.is_set(): + break repo_config = portdb.repositories.get_repo_for_location(mytree) if not repo_config.create_manifest: if repo_config.name not in disabled_repos: