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 B44B31396D0 for ; Fri, 29 Sep 2017 17:24:58 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A53A5E090A; Fri, 29 Sep 2017 17:24:57 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 80FE1E090A for ; Fri, 29 Sep 2017 17:24:57 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E6AAD34178C for ; Fri, 29 Sep 2017 17:24:55 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 70F1F8F83 for ; Fri, 29 Sep 2017 17:24:53 +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: <1506705747.5a65670ec2b0850c278b85c6417c20d8a4ca7734.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/tests/resolver/, pym/_emerge/ X-VCS-Repository: proj/portage X-VCS-Files: pym/_emerge/depgraph.py pym/portage/tests/resolver/test_slot_conflict_update.py X-VCS-Directories: pym/portage/tests/resolver/ pym/_emerge/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 5a65670ec2b0850c278b85c6417c20d8a4ca7734 X-VCS-Branch: master Date: Fri, 29 Sep 2017 17:24:53 +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: 221020ad-f265-433d-8d6e-a0ff2fae98f1 X-Archives-Hash: 7e569ceaf9e3171b6baef253ecaaa1a3 commit: 5a65670ec2b0850c278b85c6417c20d8a4ca7734 Author: Zac Medico gentoo org> AuthorDate: Fri Sep 29 07:02:27 2017 +0000 Commit: Zac Medico gentoo org> CommitDate: Fri Sep 29 17:22:27 2017 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=5a65670e _solve_..slot_conflicts: make "forced" set recursive (bug 632210) When the slot conflict solver decides that it is "forced" to choose a particular package, recursively force the dependencies as well. Prior to this fix, substitution of @world in the arguments for SlotConflictMaskUpdateTestCase caused the test to fail because the solver removed boost-build-1.53.0 from the graph event though it had added the parent boost-1.53.0 package to the "forced" set. X-Gentoo-bug: 632210 X-Gentoo-bug-url: https://bugs.gentoo.org/632210 Acked-by: Brian Dolbec gentoo.org> pym/_emerge/depgraph.py | 13 +++++++++++++ pym/portage/tests/resolver/test_slot_conflict_update.py | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index 785c036b8..3b81c5c76 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -1457,6 +1457,19 @@ class depgraph(object): # Remove 'non_conflict_node' and or_tuples from 'forced'. forced = set(pkg for pkg in forced if isinstance(pkg, Package)) + + # Add dependendencies of forced packages. + stack = list(forced) + traversed = set() + while stack: + pkg = stack.pop() + traversed.add(pkg) + for child in conflict_graph.child_nodes(pkg): + if (isinstance(child, Package) and + child not in traversed): + forced.add(child) + stack.append(child) + non_forced = set(pkg for pkg in conflict_pkgs if pkg not in forced) if debug: diff --git a/pym/portage/tests/resolver/test_slot_conflict_update.py b/pym/portage/tests/resolver/test_slot_conflict_update.py index 331e5788b..f251d01f1 100644 --- a/pym/portage/tests/resolver/test_slot_conflict_update.py +++ b/pym/portage/tests/resolver/test_slot_conflict_update.py @@ -80,7 +80,7 @@ class SlotConflictUpdateTestCase(TestCase): # this behavior makes SlotConflictMaskUpdateTestCase # fail. ResolverPlaygroundTestCase( - world, + ['@world'], all_permutations = True, options = {"--update": True, "--deep": True}, success = True,