public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Zac Medico" <zmedico@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:master commit in: lib/portage/tests/resolver/
Date: Tue, 23 Feb 2021 22:39:05 +0000 (UTC)	[thread overview]
Message-ID: <1614119854.f5a58b3f2e2adc7f9d2794d4e91d44ec1419b56a.zmedico@gentoo> (raw)

commit:     f5a58b3f2e2adc7f9d2794d4e91d44ec1419b56a
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Tue Feb 23 22:14:30 2021 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Tue Feb 23 22:37:34 2021 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=f5a58b3f

Add USE conflict unit test for bug 615824

Test bug 615824, where an automask USE change results in
a conflict which is not reported. In order to install L,
foo must be disabled for both K and M, but autounmask
disables foo for K and leaves it enabled for M:

[ebuild  N     ] sci-libs/K-1  USE="-foo"
[ebuild  N     ] sci-libs/L-1
[ebuild  N     ] sci-libs/M-1  USE="foo"

The following USE changes are necessary to proceed:
 (see "package.use" in the portage(5) man page for more details)
# required by sci-libs/L-1::test_repo
# required by sci-libs/L (argument)
>=sci-libs/K-1 -foo

Bug: https://bugs.gentoo.org/615824
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>

 .../resolver/test_autounmask_use_slot_conflict.py  | 51 ++++++++++++++++++++++
 1 file changed, 51 insertions(+)

diff --git a/lib/portage/tests/resolver/test_autounmask_use_slot_conflict.py b/lib/portage/tests/resolver/test_autounmask_use_slot_conflict.py
new file mode 100644
index 000000000..2e090d45e
--- /dev/null
+++ b/lib/portage/tests/resolver/test_autounmask_use_slot_conflict.py
@@ -0,0 +1,51 @@
+# Copyright 2017-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+from portage.tests import TestCase
+from portage.tests.resolver.ResolverPlayground import (
+	ResolverPlayground,
+	ResolverPlaygroundTestCase,
+)
+
+
+class AutounmaskUseSlotConflictTestCase(TestCase):
+	def testAutounmaskUseSlotConflict(self):
+		self.todo = True
+
+		ebuilds = {
+			"sci-libs/K-1": {"IUSE": "+foo", "EAPI": 1},
+			"sci-libs/L-1": {"DEPEND": "sci-libs/K[-foo]", "EAPI": 2},
+			"sci-libs/M-1": {"DEPEND": "sci-libs/K[foo=]", "IUSE": "+foo", "EAPI": 2},
+		}
+
+		installed = {}
+
+		test_cases = (
+			# Test bug 615824, where an automask USE change results in
+			# a conflict which is not reported. In order to install L,
+			# foo must be disabled for both K and M, but autounmask
+			# disables foo for K and leaves it enabled for M.
+			ResolverPlaygroundTestCase(
+				["sci-libs/L", "sci-libs/M"],
+				options={"--backtrack": 0},
+				success=False,
+				mergelist=[
+					"sci-libs/L-1",
+					"sci-libs/M-1",
+					"sci-libs/K-1",
+				],
+				ignore_mergelist_order=True,
+				slot_collision_solutions=[
+					{"sci-libs/K-1": {"foo": False}, "sci-libs/M-1": {"foo": False}}
+				],
+			),
+		)
+
+		playground = ResolverPlayground(ebuilds=ebuilds, installed=installed)
+		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()


             reply	other threads:[~2021-02-23 22:39 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-23 22:39 Zac Medico [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-04-12 19:50 [gentoo-commits] proj/portage:master commit in: lib/portage/tests/resolver/ Sam James
2025-03-13 17:06 Sam James
2025-03-09 21:54 Sam James
2025-03-09 21:54 Sam James
2024-05-26 18:58 Zac Medico
2024-05-26 18:48 Zac Medico
2024-02-09 21:40 Zac Medico
2023-12-24 19:30 Zac Medico
2023-11-28 22:26 Sam James
2023-11-18  1:16 Zac Medico
2023-06-19 21:17 Sam James
2023-06-16  3:34 Sam James
2023-06-16  3:34 Sam James
2023-05-26 15:45 Sam James
2023-05-26 15:45 Sam James
2023-05-26 15:45 Sam James
2023-02-19 19:19 Sam James
2023-01-02 20:45 Mike Gilbert
2022-07-25 22:01 Zac Medico
2022-07-25 20:44 Mike Gilbert
2022-02-14  0:14 Zac Medico
2021-05-24  6:33 Zac Medico
2021-03-28  6:21 Zac Medico
2021-03-06  9:53 Zac Medico
2021-03-01  8:56 Zac Medico
2021-03-01  6:43 Zac Medico
2021-01-11  3:40 Zac Medico
2020-12-02 17:33 Zac Medico
2020-11-15  5:56 Zac Medico
2020-09-19 20:28 Zac Medico
2020-08-30 22:39 Zac Medico
2020-08-03 23:28 Zac Medico
2020-08-03 23:28 Zac Medico
2020-08-03 23:28 Zac Medico
2020-08-03 21:42 Zac Medico
2020-08-03 19:30 Zac Medico
2020-04-11 23:50 Zac Medico
2020-02-10  3:19 Zac Medico
2020-02-10  2:29 Zac Medico
2020-02-09 23:57 Zac Medico
2020-02-09 23:15 Zac Medico
2020-02-08  8:35 Zac Medico
2020-02-01  4:48 Zac Medico
2020-01-26  6:27 Zac Medico
2020-01-26  0:20 Zac Medico
2020-01-25 22:37 Zac Medico
2020-01-21  2:37 Zac Medico
2019-12-25  8:18 Zac Medico
2019-12-22  0:35 Zac Medico
2019-12-22  0:28 Zac Medico
2019-12-21 23:54 Zac Medico
2019-11-16  9:57 Zac Medico
2019-10-21  8:26 Zac Medico
2019-10-11  4:00 Zac Medico
2019-09-15  3:36 Zac Medico
2019-09-12 19:43 Zac Medico
2019-09-12 19:05 Zac Medico
2019-01-20 19:27 Zac Medico
2018-12-30  2:34 Zac Medico

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1614119854.f5a58b3f2e2adc7f9d2794d4e91d44ec1419b56a.zmedico@gentoo \
    --to=zmedico@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox