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 1PoqZY-00052b-6O for garchives@archives.gentoo.org; Mon, 14 Feb 2011 05:02:04 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 811BCE080A; Mon, 14 Feb 2011 05:01:55 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 4DA1BE080A for ; Mon, 14 Feb 2011 05:01:55 +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 D42271B4094 for ; Mon, 14 Feb 2011 05:01:54 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 31D7A8006A for ; Mon, 14 Feb 2011 05:01:54 +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: <080ee08b577177342b42a7bb2ec22555f0d1d259.zmedico@gentoo> 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: 080ee08b577177342b42a7bb2ec22555f0d1d259 Date: Mon, 14 Feb 2011 05:01:54 +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: 00ddb8a75a4ad5c8bf06cb97c306b290 commit: 080ee08b577177342b42a7bb2ec22555f0d1d259 Author: Zac Medico gentoo org> AuthorDate: Mon Feb 14 04:57:57 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Mon Feb 14 04:57:57 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3D080ee08b get_dep_chain: fix unsatisfied_dependency logic Always prefer parents for which the parent atom is unsatisfied by the child node. This seems to be the intention of the code, though it may not have behaved correctly due to continuation of the parent loop. --- pym/_emerge/depgraph.py | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index ef4d1f0..d6c74e4 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -2363,6 +2363,7 @@ class depgraph(object): selected_parent =3D None parent_arg =3D None parent_merge =3D None + parent_unsatisfied =3D None =20 for parent in self._dynamic_config.digraph.parent_nodes(node): if parent in traversed_nodes: @@ -2381,12 +2382,14 @@ class depgraph(object): if parent is ppkg: atom_set =3D InternalPackageSet(initial_atoms=3D(atom,)) if not atom_set.findAtomForPackage(start_node): - selected_parent =3D parent + parent_unsatisfied =3D parent break else: selected_parent =3D parent =20 - if parent_merge is not None: + if parent_unsatisfied is not None: + selected_parent =3D parent_unsatisfied + elif parent_merge is not None: # Prefer parent in the merge list (bug #354747). selected_parent =3D parent_merge elif parent_arg is not None: