From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([69.77.167.62] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1KIYkD-0003Jk-FD for garchives@archives.gentoo.org; Tue, 15 Jul 2008 00:50:17 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 846B5E04F8; Tue, 15 Jul 2008 00:50:16 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 54121E04F8 for ; Tue, 15 Jul 2008 00:50:16 +0000 (UTC) Received: from stork.gentoo.org (stork.gentoo.org [64.127.104.133]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTP id CF32B66137 for ; Tue, 15 Jul 2008 00:50:15 +0000 (UTC) Received: from zmedico by stork.gentoo.org with local (Exim 4.69) (envelope-from ) id 1KIYkA-0003GU-KB for gentoo-commits@lists.gentoo.org; Tue, 15 Jul 2008 00:50:14 +0000 To: gentoo-commits@lists.gentoo.org From: "Zac Medico (zmedico)" Subject: [gentoo-commits] portage r11050 - main/trunk/pym/_emerge X-VCS-Repository: portage X-VCS-Revision: 11050 X-VCS-Files: main/trunk/pym/_emerge/__init__.py X-VCS-Directories: main/trunk/pym/_emerge X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico Content-Type: text/plain; charset=UTF-8 Message-Id: Sender: Zac Medico Date: Tue, 15 Jul 2008 00:50:14 +0000 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 99bcee41-4c09-40bd-83cb-4d7e8045843b X-Archives-Hash: 2633f8d1bd6d9d62232ee6c42f50959a 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 t= asks that may still be running. Modified: main/trunk/pym/_emerge/__init__.py =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- 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 >=3D self._pkg_count.maxval: return =20 + self._main_loop_cleanup() + logger =3D self._logger pkg_count =3D self._pkg_count mtimedb =3D 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 =3D 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 @@ =20 return rval =20 + def _main_loop_cleanup(self): + del self._pkg_queue[:] + self._completed_tasks.clear() + self._digraph =3D None + self._task_queues.fetch.clear() + def _choose_pkg(self): """ Choose a task that has all it's dependencies satisfied. --=20 gentoo-commits@lists.gentoo.org mailing list