* [gentoo-commits] portage r11050 - main/trunk/pym/_emerge
@ 2008-07-15 0:50 Zac Medico (zmedico)
0 siblings, 0 replies; only message in thread
From: Zac Medico (zmedico) @ 2008-07-15 0:50 UTC (permalink / raw
To: gentoo-commits
Author: zmedico
Date: 2008-07-15 00:50:13 +0000 (Tue, 15 Jul 2008)
New Revision: 11050
Modified:
main/trunk/pym/_emerge/__init__.py
Log:
Split out a _main_loop_cleanup() method from Scheduler._merge() and call it
before restarting in _restart_if_necessary() to kill any parallel-fetch tasks
that may still be running.
Modified: main/trunk/pym/_emerge/__init__.py
===================================================================
--- main/trunk/pym/_emerge/__init__.py 2008-07-14 23:31:51 UTC (rev 11049)
+++ main/trunk/pym/_emerge/__init__.py 2008-07-15 00:50:13 UTC (rev 11050)
@@ -8730,6 +8730,8 @@
if self._pkg_count.curval >= self._pkg_count.maxval:
return
+ self._main_loop_cleanup()
+
logger = self._logger
pkg_count = self._pkg_count
mtimedb = self._mtimedb
@@ -8902,12 +8904,7 @@
try:
self._main_loop()
finally:
- # discard remaining packages if necessary
- del pkg_queue[:]
- self._completed_tasks.clear()
- self._digraph = None
- self._task_queues.fetch.clear()
-
+ self._main_loop_cleanup()
# discard any failures and return the
# exist status of the last one
if failed_pkgs:
@@ -8917,6 +8914,12 @@
return rval
+ def _main_loop_cleanup(self):
+ del self._pkg_queue[:]
+ self._completed_tasks.clear()
+ self._digraph = None
+ self._task_queues.fetch.clear()
+
def _choose_pkg(self):
"""
Choose a task that has all it's dependencies satisfied.
--
gentoo-commits@lists.gentoo.org mailing list
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-07-15 0:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-15 0:50 [gentoo-commits] portage r11050 - main/trunk/pym/_emerge Zac Medico (zmedico)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox