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 3684B1382C5 for ; Mon, 11 Jan 2021 03:40:36 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8E2BDE0A8E; Mon, 11 Jan 2021 03:40:34 +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 20D70E0A8E for ; Mon, 11 Jan 2021 03:40:33 +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 6095733BF5D for ; Mon, 11 Jan 2021 03:40:31 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id C13E647 for ; Mon, 11 Jan 2021 03:40:29 +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: <1610334268.9b6417f527aa98742a51d7859051342b6fb1383f.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_slot_operator_reverse_deps.py X-VCS-Directories: lib/portage/tests/resolver/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 9b6417f527aa98742a51d7859051342b6fb1383f X-VCS-Branch: master Date: Mon, 11 Jan 2021 03:40:29 +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: 88bb2beb-e940-4d1f-9239-3820c8b849fb X-Archives-Hash: dc2c35bcfcfd3cd3aa821d33398754aa commit: 9b6417f527aa98742a51d7859051342b6fb1383f Author: Zac Medico gentoo org> AuthorDate: Mon Jan 11 01:57:44 2021 +0000 Commit: Zac Medico gentoo org> CommitDate: Mon Jan 11 03:04:28 2021 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=9b6417f5 Add unit test demonstrating bug 764764 Bug: https://bugs.gentoo.org/764764 Signed-off-by: Zac Medico gentoo.org> .../resolver/test_slot_operator_reverse_deps.py | 98 +++++++++++++++++++++- 1 file changed, 97 insertions(+), 1 deletion(-) diff --git a/lib/portage/tests/resolver/test_slot_operator_reverse_deps.py b/lib/portage/tests/resolver/test_slot_operator_reverse_deps.py index 6641e9987..6e7214043 100644 --- a/lib/portage/tests/resolver/test_slot_operator_reverse_deps.py +++ b/lib/portage/tests/resolver/test_slot_operator_reverse_deps.py @@ -1,4 +1,4 @@ -# Copyright 2016-2020 Gentoo Authors +# Copyright 2016-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 from portage.tests import TestCase @@ -202,3 +202,99 @@ class SlotOperatorReverseDepsLibGit2TestCase(TestCase): finally: playground.debug = False playground.cleanup() + + +class SlotOperatorReverseDepsVirtualTestCase(TestCase): + + def testSlotOperatorReverseDepsVirtual(self): + """ + Demonstrate bug #764764, where slot operator rebuilds were + not triggered for reverse deps of virtual/dist-kernel. + """ + + ebuilds = { + + "app-emulation/virtualbox-modules-6.1.16-r1": { + "EAPI": "7", + "DEPEND": "virtual/dist-kernel", + "RDEPEND": "virtual/dist-kernel:=", + }, + + "sys-kernel/gentoo-kernel-5.10.6": { + "EAPI": "7", + "SLOT": "5.10.6", + }, + + "sys-kernel/gentoo-kernel-5.10.5": { + "EAPI": "7", + "SLOT": "5.10.5", + }, + + "virtual/dist-kernel-5.10.5" : { + "EAPI": "7", + "SLOT": "0/5.10.5", + "RDEPEND": "~sys-kernel/gentoo-kernel-5.10.5", + }, + + "virtual/dist-kernel-5.10.6" : { + "EAPI": "7", + "SLOT": "0/5.10.6", + "RDEPEND": "~sys-kernel/gentoo-kernel-5.10.6" + }, + + "x11-drivers/nvidia-drivers-460.32.03" : { + "EAPI": "7", + "DEPEND": "virtual/dist-kernel", + "RDEPEND": "virtual/dist-kernel:=", + }, + + } + + installed = { + + "app-emulation/virtualbox-modules-6.1.16-r1": { + "EAPI": "7", + "DEPEND": "virtual/dist-kernel", + "RDEPEND": "virtual/dist-kernel:0/5.10.5=", + }, + + "sys-kernel/gentoo-kernel-5.10.5": { + "EAPI": "7", + "SLOT": "5.10.5", + }, + + "virtual/dist-kernel-5.10.5" : { + "EAPI": "7", + "SLOT": "0/5.10.5", + "RDEPEND": "~sys-kernel/gentoo-kernel-5.10.5" + }, + + "x11-drivers/nvidia-drivers-460.32.03" : { + "EAPI": "7", + "DEPEND": "virtual/dist-kernel", + "RDEPEND": "virtual/dist-kernel:0/5.10.5=" + }, + + } + + world = ["app-emulation/virtualbox-modules", "x11-drivers/nvidia-drivers"] + + test_cases = ( + ResolverPlaygroundTestCase( + ["@world"], + options = {"--update": True, "--deep": True}, + success = True, + mergelist = [] + ), + ) + + playground = ResolverPlayground(ebuilds=ebuilds, + installed=installed, world=world, 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()