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 1QVK9B-0001ZL-Bq for garchives@archives.gentoo.org; Sat, 11 Jun 2011 09:06:25 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D84581C157; Sat, 11 Jun 2011 09:06:17 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id A0A8F1C157 for ; Sat, 11 Jun 2011 09:06:17 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 376061B4035 for ; Sat, 11 Jun 2011 09:06:17 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 3E0058003C for ; Sat, 11 Jun 2011 09:06:16 +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: Subject: [gentoo-commits] proj/portage:master commit in: pym/_emerge/ X-VCS-Repository: proj/portage X-VCS-Files: pym/_emerge/depgraph.py X-VCS-Directories: pym/_emerge/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: adde8a45e2f82adcc12cb146ccc65774d5783bf2 Date: Sat, 11 Jun 2011 09:06:16 +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: eb3a088ce6454d01960d1e20f74b086e commit: adde8a45e2f82adcc12cb146ccc65774d5783bf2 Author: Zac Medico gentoo org> AuthorDate: Sat Jun 11 09:05:51 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Sat Jun 11 09:05:51 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3Dadde8a45 serialize_tasks: minimize runtime cycles more --- pym/_emerge/depgraph.py | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index 5dda222..854fa63 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -5015,6 +5015,7 @@ class depgraph(object): # this tends to produce a more optimal merge order. # Ignoring all medium_soft deps serves this purpose. ignore_priority =3D priority_range.ignore_medium_soft + smallest_cycle =3D None for node in nodes: if not mygraph.parent_nodes(node): continue @@ -5037,9 +5038,11 @@ class depgraph(object): selected_nodes =3D None break if selected_nodes: - break - else: - selected_nodes =3D None + if smallest_cycle is None or \ + len(selected_nodes) < len(smallest_cycle): + smallest_cycle =3D selected_nodes + + selected_nodes =3D smallest_cycle =20 if prefer_asap and asap_nodes and not selected_nodes: # We failed to find any asap nodes to merge, so ignore