From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1QJAwD-0000V9-WE for garchives@archives.gentoo.org; Sun, 08 May 2011 20:50:50 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 365DB1C04D; Sun, 8 May 2011 20:50:13 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id E44EC1C04C for ; Sun, 8 May 2011 20:50:12 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id A638E1BC017 for ; Sun, 8 May 2011 20:50:12 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 0F7AA45B2A for ; Sun, 8 May 2011 20:50:12 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <87077a5c26fb164e7db172b380111694855bc4a0.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:2.1.9 commit in: pym/_emerge/ X-VCS-Repository: proj/portage X-VCS-Files: pym/_emerge/Scheduler.py X-VCS-Directories: pym/_emerge/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 87077a5c26fb164e7db172b380111694855bc4a0 Date: Sun, 8 May 2011 20:50:12 +0000 (UTC) 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: X-Archives-Hash: f517b0debaeeb5d63f46f30ac11a9b55 commit: 87077a5c26fb164e7db172b380111694855bc4a0 Author: Zac Medico gentoo org> AuthorDate: Sun May 8 05:58:33 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Sun May 8 18:53:43 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3D87077a5c Be careful with system pkgs + parallel-install. This should prevent FEATURES=3Dparallel-install from interfering with the fixes from bug #256616 and bug #259954. --- pym/_emerge/Scheduler.py | 28 ++++++++++++++++++---------- 1 files changed, 18 insertions(+), 10 deletions(-) diff --git a/pym/_emerge/Scheduler.py b/pym/_emerge/Scheduler.py index 1b79623..e71f4f6 100644 --- a/pym/_emerge/Scheduler.py +++ b/pym/_emerge/Scheduler.py @@ -3,6 +3,7 @@ =20 from __future__ import print_function =20 +from collections import deque import gc import gzip import logging @@ -176,8 +177,9 @@ class Scheduler(PollScheduler): =20 # Holds merges that will wait to be executed when no builds are # executing. This is useful for system packages since dependencies - # on system packages are frequently unspecified. - self._merge_wait_queue =3D [] + # on system packages are frequently unspecified. For example, see + # bug #256616. + self._merge_wait_queue =3D deque() # Holds merges that have been transfered from the merge_wait_queue to # the actual merge queue. They are removed from this list upon # completion. Other packages can start building only when this list is @@ -1631,14 +1633,19 @@ class Scheduler(PollScheduler): =20 while True: =20 - # When the number of jobs drops to zero, process all waiting merges. - if not self._jobs and self._merge_wait_queue: - for task in self._merge_wait_queue: - task.addExitListener(self._merge_wait_exit_handler) - self._task_queues.merge.add(task) + # When the number of jobs and merges drops to zero, + # process a single merge from _merge_wait_queue if + # it's not empty. We only process one since these are + # special packages and we want to ensure that + # parallel-install does not cause more than one of + # them to install at the same time. + if (self._merge_wait_queue and not self._jobs and + not self._task_queues.merge): + task =3D self._merge_wait_queue.popleft() + task.addExitListener(self._merge_wait_exit_handler) + self._task_queues.merge.add(task) self._status_display.merges =3D len(self._task_queues.merge) - self._merge_wait_scheduled.extend(self._merge_wait_queue) - del self._merge_wait_queue[:] + self._merge_wait_scheduled.append(task) =20 self._schedule_tasks_imp() self._status_display.display() @@ -1657,7 +1664,8 @@ class Scheduler(PollScheduler): state_change +=3D 1 =20 if not (state_change or \ - (not self._jobs and self._merge_wait_queue)): + (self._merge_wait_queue and not self._jobs and + not self._task_queues.merge)): break =20 return self._keep_scheduling()