From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id AC97C1395E2 for ; Mon, 5 Dec 2016 05:10:15 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BA56DE0DDA; Mon, 5 Dec 2016 05:10:14 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 9D9E7E0DDA for ; Mon, 5 Dec 2016 05:10:14 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 4F143341027 for ; Mon, 5 Dec 2016 05:10:13 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id A37C424B0 for ; Mon, 5 Dec 2016 05:10:11 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1480913732.ab07ac68fa1e04ed64e2e0f6c753ff169a32d517.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: ab07ac68fa1e04ed64e2e0f6c753ff169a32d517 X-VCS-Branch: master Date: Mon, 5 Dec 2016 05:10:11 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: fa1bbaa2-7608-4270-85b1-1b99587d987e X-Archives-Hash: ee5db1b76ec11ca70e3a13b675b03601 commit: ab07ac68fa1e04ed64e2e0f6c753ff169a32d517 Author: Zac Medico gentoo org> AuthorDate: Mon Dec 5 02:38:49 2016 +0000 Commit: Zac Medico gentoo org> CommitDate: Mon Dec 5 04:55:32 2016 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=ab07ac68 depgraph: select highest version involved in slot conflict (bug 554070) Fix depgraph's package selection logic to choose the highest version involved in a slot conflict, for correct operation of conflict_downgrade logic in the dep_zapdeps function which was introduced in commit a9064d08ef4c92a5d0d1bfb3dc8a01b7850812b0. This will prevent incorrect re-ordering of || deps in dep_zapdeps, as reported in bug 554070. X-Gentoo-Bug: 554070 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=554070 Fixes a9064d08ef4c ("Solve more slot-operator conflicts (531656)") Acked-by: Brian Dolbec gentoo.org> pym/_emerge/depgraph.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index 9161914..ee6cf68 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -6071,8 +6071,15 @@ class depgraph(object): # will always end with a break statement below # this point. if find_existing_node: - e_pkg = next(self._dynamic_config._package_tracker.match( - root, pkg.slot_atom, installed=False), None) + # Use reversed iteration in order to get + # descending order here, so that the highest + # version involved in a slot conflict is + # selected. This is needed for correct operation + # of conflict_downgrade logic in the dep_zapdeps + # function (see bug 554070). + e_pkg = next(reversed(list( + self._dynamic_config._package_tracker.match( + root, pkg.slot_atom, installed=False))), None) if not e_pkg: break