From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:master commit in: lib/portage/tests/resolver/
Date: Fri, 16 Jun 2023 03:34:54 +0000 (UTC) [thread overview]
Message-ID: <1686886486.ff457f742b513a65e6609054e5310f8beee488ec.sam@gentoo> (raw)
commit: ff457f742b513a65e6609054e5310f8beee488ec
Author: YiFei Zhu <zhuyifei1999 <AT> gmail <DOT> com>
AuthorDate: Tue Jun 13 08:08:51 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Jun 16 03:34:46 2023 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=ff457f74
tests: resolver: Test the broken behavior of Perl rebuild bug
Bug: https://bugs.gentoo.org/463976
Bug: https://bugs.gentoo.org/592880
Bug: https://bugs.gentoo.org/596664
Bug: https://bugs.gentoo.org/631490
Bug: https://bugs.gentoo.org/764365
Bug: https://bugs.gentoo.org/793992
Signed-off-by: YiFei Zhu <zhuyifei1999 <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../tests/resolver/test_perl_rebuild_bug.py | 121 +++++++++++++++++++++
1 file changed, 121 insertions(+)
diff --git a/lib/portage/tests/resolver/test_perl_rebuild_bug.py b/lib/portage/tests/resolver/test_perl_rebuild_bug.py
new file mode 100644
index 000000000..928fd47d7
--- /dev/null
+++ b/lib/portage/tests/resolver/test_perl_rebuild_bug.py
@@ -0,0 +1,121 @@
+# Copyright 2023 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 PerlRebuildBugTestCase(TestCase):
+ def __init__(self, *args, **kwargs):
+ super().__init__(*args, **kwargs)
+
+ def testPerlRebuildBug(self):
+ """
+ The infamous Perl rebuild bug.
+
+ A non-slotted build-time dependency cycle is created by:
+ dev-lang/perl -> sys-libs/zlib -> sys-devel/automake -> dev-lang/perl
+ Everything else depends on this cycle.
+
+ Bug in solving for smallest cycle causes slot in RDEPEND of
+ dev-perl/Locale-gettext to be ignored, so all dependencies other than
+ perl's >=sys-libs/zlib-1.2.12 are satisfied by already-installed
+ packages. dev-perl/Locale-gettext and sys-devel/automake become leaves
+ of the depgraph after satisfied packages are ignored. They become
+ emerged first. This causes an issue because dev-perl/Locale-gettext is
+ now built before the slot upgrade of dev-lang/perl.
+ """
+ ebuilds = {
+ "dev-lang/perl-5.36.0-r2": {
+ "EAPI": "5",
+ "DEPEND": ">=sys-libs/zlib-1.2.12",
+ "RDEPEND": ">=sys-libs/zlib-1.2.12",
+ "SLOT": "0/5.36",
+ },
+ "dev-perl/Locale-gettext-1.70.0-r1": {
+ "EAPI": "5",
+ "DEPEND": "dev-lang/perl",
+ "RDEPEND": "dev-lang/perl:=",
+ },
+ "sys-apps/help2man-1.49.3": {
+ "EAPI": "5",
+ "DEPEND": "dev-lang/perl dev-perl/Locale-gettext",
+ "RDEPEND": "dev-lang/perl dev-perl/Locale-gettext",
+ },
+ "sys-devel/automake-1.16.5": {
+ "EAPI": "5",
+ "DEPEND": "dev-lang/perl",
+ "RDEPEND": "dev-lang/perl",
+ },
+ "sys-libs/zlib-1.2.13-r1": {
+ "EAPI": "5",
+ "DEPEND": "sys-devel/automake",
+ },
+ }
+
+ installed = {
+ "dev-lang/perl-5.34.0-r3": {
+ "EAPI": "5",
+ "DEPEND": "sys-libs/zlib",
+ "RDEPEND": "sys-libs/zlib",
+ "SLOT": "0/5.34",
+ },
+ "dev-perl/Locale-gettext-1.70.0-r1": {
+ "EAPI": "5",
+ "DEPEND": "dev-lang/perl",
+ "RDEPEND": "dev-lang/perl:0/5.34=",
+ },
+ "sys-apps/help2man-1.48.5": {
+ "EAPI": "5",
+ "DEPEND": "dev-lang/perl dev-perl/Locale-gettext",
+ "RDEPEND": "dev-lang/perl dev-perl/Locale-gettext",
+ },
+ "sys-devel/automake-1.16.4": {
+ "EAPI": "5",
+ "DEPEND": "dev-lang/perl",
+ "RDEPEND": "dev-lang/perl",
+ },
+ "sys-libs/zlib-1.2.11-r4": {
+ "EAPI": "5",
+ "DEPEND": "sys-devel/automake",
+ },
+ }
+
+ world = ["sys-apps/help2man"]
+
+ test_cases = (
+ ResolverPlaygroundTestCase(
+ ["@world"],
+ options={"--deep": True, "--update": True, "--verbose": True},
+ success=True,
+ ambiguous_merge_order=True,
+ merge_order_assertions=(
+ (
+ "dev-perl/Locale-gettext-1.70.0-r1",
+ "dev-lang/perl-5.36.0-r2",
+ ),
+ ),
+ mergelist=[
+ "dev-perl/Locale-gettext-1.70.0-r1",
+ "sys-devel/automake-1.16.5",
+ "sys-libs/zlib-1.2.13-r1",
+ "dev-lang/perl-5.36.0-r2",
+ "sys-apps/help2man-1.49.3",
+ ],
+ ),
+ )
+
+ playground = ResolverPlayground(
+ ebuilds=ebuilds,
+ installed=installed,
+ world=world,
+ )
+ 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.cleanup()
next reply other threads:[~2023-06-16 3:34 UTC|newest]
Thread overview: 56+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-16 3:34 Sam James [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-05-26 18:58 [gentoo-commits] proj/portage:master commit in: lib/portage/tests/resolver/ 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-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-02-23 22:39 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=1686886486.ff457f742b513a65e6609054e5310f8beee488ec.sam@gentoo \
--to=sam@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