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 1Poq79-00088S-D2 for garchives@archives.gentoo.org; Mon, 14 Feb 2011 04:32:43 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B705AE08F7; Mon, 14 Feb 2011 04:31:35 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 86B5AE08F7 for ; Mon, 14 Feb 2011 04:31:35 +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 1A0611B4094 for ; Mon, 14 Feb 2011 04:31:35 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 391A680073 for ; Mon, 14 Feb 2011 04:31:34 +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: <315a6d6872d0f4b6a36844de97fd172bbec3a90d.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:2.1.9 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: 315a6d6872d0f4b6a36844de97fd172bbec3a90d Date: Mon, 14 Feb 2011 04:31:34 +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: 0a2c2f3644384e808bfc644bc3884cd4 commit: 315a6d6872d0f4b6a36844de97fd172bbec3a90d Author: Zac Medico gentoo org> AuthorDate: Sat Feb 12 06:09:30 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Mon Feb 14 04:25:15 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3D315a6d68 depgraph: don't distort edges for virtuals In _add_pkg_dep_string(), _add_pkg() was called with generated Dependency instances that created fake/distorted edges in the graph for new-style virtuals (similar to those that were fixed in commit 5b16e0d800f34dc90cdd8c505172ad16b97f0af4). Now there won't be any such distorted edges. --- pym/_emerge/depgraph.py | 28 +++++++++++++++++++--------- 1 files changed, 19 insertions(+), 9 deletions(-) diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index fc84be6..22d9314 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -1296,21 +1296,31 @@ class depgraph(object): # by dep_zapdeps. We preserve actual parent/child relationships # here in order to avoid distorting the dependency graph like # <=3Dportage-2.1.6.x did. - for virt_pkg, atoms in selected_atoms.items(): + while selected_atoms: + + # Since _select_atoms currently doesn't return parent + # info for recursively traversed virtuals, the parent + # is not known here. However, this package may have + # already been added to graph above, so we add packages + # with parents first. This way, parents are already + # recorded before a given package is added, which allows + # us to avoid triggering a slot conflict before the + # parent is known. + for virt_pkg, atoms in selected_atoms.items(): + try: + if self._dynamic_config.digraph.parent_nodes(virt_pkg): + break + except KeyError: + pass + + selected_atoms.pop(virt_pkg) =20 if debug: writemsg_level("Candidates: %s: %s\n" % \ (virt_pkg.cpv, [str(x) for x in atoms]), noiselevel=3D-1, level=3Dlogging.DEBUG) =20 - # Just assume depth + 1 here for now, though it's not entirely - # accurate since multilple levels of indirect virtual deps may - # have been traversed. The _add_pkg call will reset the depth to - # 0 if this package happens to match an argument. - if not self._add_pkg(virt_pkg, - Dependency(atom=3DAtom('=3D' + virt_pkg.cpv), - depth=3D(depth + 1), parent=3Dpkg, priority=3Ddep_priority.copy(), - root=3Ddep_root)): + if not self._add_pkg(virt_pkg, None): return 0 =20 for atom, child in self._minimize_children(