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 BC463138350 for ; Tue, 21 Jan 2020 02:37:28 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 91DC7E086C; Tue, 21 Jan 2020 02:37:26 +0000 (UTC) Received: from smtp.gentoo.org (mail.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 5BC54E086C for ; Tue, 21 Jan 2020 02:37:26 +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 783A034E332 for ; Tue, 21 Jan 2020 02:37:24 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 7A2C2A5 for ; Tue, 21 Jan 2020 02:37:22 +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: <1579574143.e5878170638a091db1331df7e7922c8a14e29e86.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: lib/portage/tests/resolver/ X-VCS-Repository: proj/portage X-VCS-Files: lib/portage/tests/resolver/test_circular_choices.py X-VCS-Directories: lib/portage/tests/resolver/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: e5878170638a091db1331df7e7922c8a14e29e86 X-VCS-Branch: master Date: Tue, 21 Jan 2020 02:37:22 +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-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: bc4c8ca6-7408-461b-8a49-2013b4d6709a X-Archives-Hash: 030ddc56c2def8026b7c4d547944c1fd commit: e5878170638a091db1331df7e7922c8a14e29e86 Author: Zac Medico gentoo org> AuthorDate: Tue Jan 21 01:59:30 2020 +0000 Commit: Zac Medico gentoo org> CommitDate: Tue Jan 21 02:35:43 2020 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=e5878170 Add unit test which demonstrates bug 705986 This USE suggestion appears to prevent application of || preference adjustment to solve the cycle (pypy-exe-bin would solve it): * Error: circular dependencies: (dev-python/pypy-exe-7.3.0:7.3.0/7.3.0::test_repo, ebuild scheduled for merge) depends on (dev-python/pypy-7.3.0:0/73::test_repo, ebuild scheduled for merge) (buildtime) (dev-python/pypy-exe-7.3.0:7.3.0/7.3.0::test_repo, ebuild scheduled for merge) (buildtime) It might be possible to break this cycle by applying the following change: - dev-python/pypy-exe-7.3.0 (Change USE: +low-memory) Meanwhile, an explicit pypy-exe-bin argument adjusts the || preference and breaks the cycle: $ emerge -pq pypy pypy-exe-bin [ebuild N ] dev-python/pypy-exe-bin-7.3.0 [ebuild N ] dev-python/pypy-7.3.0 Bug: https://bugs.gentoo.org/705986 Signed-off-by: Zac Medico gentoo.org> .../tests/resolver/test_circular_choices.py | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/lib/portage/tests/resolver/test_circular_choices.py b/lib/portage/tests/resolver/test_circular_choices.py index a5c10b476..968677a46 100644 --- a/lib/portage/tests/resolver/test_circular_choices.py +++ b/lib/portage/tests/resolver/test_circular_choices.py @@ -160,3 +160,51 @@ class VirtualCircularChoicesTestCase(TestCase): self.assertEqual(test_case.test_success, True, test_case.fail_msg) finally: playground.cleanup() + + +class CircularPypyExeTestCase(TestCase): + def testCircularPypyExe(self): + + ebuilds = { + 'dev-python/pypy-7.3.0': { + 'EAPI': '7', + 'SLOT' : '0/73', + 'DEPEND': '|| ( dev-python/pypy-exe dev-python/pypy-exe-bin )' + }, + 'dev-python/pypy-exe-7.3.0': { + 'EAPI': '7', + 'IUSE': 'low-memory', + 'SLOT' : '7.3.0', + 'BDEPEND': '!low-memory? ( dev-python/pypy )' + }, + 'dev-python/pypy-exe-bin-7.3.0': { + 'EAPI': '7', + 'SLOT' : '7.3.0', + }, + } + + test_cases = ( + # Demonstrate bug 705986, where a USE change suggestion is given + # even though an || preference adjustment is available. + ResolverPlaygroundTestCase( + ['dev-python/pypy'], + circular_dependency_solutions = {'dev-python/pypy-7.3.0': {frozenset({('low-memory', True)})}}, + success = False, + ), + # Demonstrate explicit pypy-exe-bin argument used as a workaround + # for bug 705986. + ResolverPlaygroundTestCase( + ['dev-python/pypy', 'dev-python/pypy-exe-bin'], + mergelist=['dev-python/pypy-exe-bin-7.3.0', 'dev-python/pypy-7.3.0'], + success = True, + ), + ) + + playground = ResolverPlayground(ebuilds=ebuilds, debug=False) + try: + for test_case in test_cases: + playground.run_TestCase(test_case) + self.assertEqual(test_case.test_success, True, test_case.fail_msg) + finally: + playground.debug = False + playground.cleanup()