Gentoo Archives: gentoo-commits

From: Zac Medico <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:master commit in: lib/portage/tests/resolver/
Date: Sun, 30 Aug 2020 22:39:51
Message-Id: 1598827122.8b9345976c95ff41c7f075f7917d498f77d7d155.zmedico@gentoo
1 commit: 8b9345976c95ff41c7f075f7917d498f77d7d155
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Sun Aug 30 22:18:35 2020 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Sun Aug 30 22:38:42 2020 +0000
6 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=8b934597
7
8 test_slot_conflict_rebuild: Add dev-lang/go case for bug 439688
9
10 Demonstrate this unwanted dev-lang/go rebuild triggered by a missed
11 update due to a slot conflict:
12
13 [ebuild R ] dev-lang/go-1.14.7
14
15 WARNING: One or more updates/rebuilds have been skipped due to a dependency conflict:
16
17 dev-lang/go:0
18
19 (dev-lang/go-1.15:0/1.15::test_repo, ebuild scheduled for merge) USE="" conflicts with
20 =dev-lang/go-1.14* required by (net-p2p/syncthing-1.3.4-r1:0/0::test_repo, installed) USE=""
21 ^ ^^^^^
22
23 Bug: https://bugs.gentoo.org/439688
24 Bug: https://bugs.gentoo.org/739648
25 Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>
26
27 .../tests/resolver/test_slot_conflict_rebuild.py | 64 +++++++++++++++++++++-
28 1 file changed, 63 insertions(+), 1 deletion(-)
29
30 diff --git a/lib/portage/tests/resolver/test_slot_conflict_rebuild.py b/lib/portage/tests/resolver/test_slot_conflict_rebuild.py
31 index 95b6396ba..b3bcf44d0 100644
32 --- a/lib/portage/tests/resolver/test_slot_conflict_rebuild.py
33 +++ b/lib/portage/tests/resolver/test_slot_conflict_rebuild.py
34 @@ -1,4 +1,4 @@
35 -# Copyright 2012-2014 Gentoo Foundation
36 +# Copyright 2012-2020 Gentoo Authors
37 # Distributed under the terms of the GNU General Public License v2
38
39 from portage.tests import TestCase
40 @@ -453,3 +453,65 @@ class SlotConflictRebuildTestCase(TestCase):
41 self.assertEqual(test_case.test_success, True, test_case.fail_msg)
42 finally:
43 playground.cleanup()
44 +
45 +class SlotConflictRebuildGolangTestCase(TestCase):
46 +
47 + def testSlotConflictRebuildGolang(self):
48 + self.todo = True
49 +
50 + ebuilds = {
51 +
52 + "dev-lang/go-1.14.7" : {
53 + "EAPI": "7",
54 + "SLOT": "0/1.14.7"
55 + },
56 +
57 + "dev-lang/go-1.15" : {
58 + "EAPI": "7",
59 + "SLOT": "0/1.15"
60 + },
61 +
62 + "net-p2p/syncthing-1.3.4-r1" : {
63 + "EAPI": "7",
64 + "BDEPEND": "=dev-lang/go-1.14* >=dev-lang/go-1.12"
65 + },
66 +
67 + }
68 +
69 + installed = {
70 +
71 + "dev-lang/go-1.14.7" : {
72 + "EAPI": "7",
73 + "SLOT": "0/1.14.7"
74 + },
75 +
76 + "net-p2p/syncthing-1.3.4-r1" : {
77 + "EAPI": "7",
78 + "BDEPEND": "=dev-lang/go-1.14* >=dev-lang/go-1.12"
79 + },
80 +
81 + }
82 +
83 + world = ["dev-lang/go", "net-p2p/syncthing"]
84 +
85 + test_cases = (
86 +
87 + # Demonstrate an unwanted dev-lang/go rebuild triggered by a missed
88 + # update due to a slot conflict (bug #439688).
89 + ResolverPlaygroundTestCase(
90 + ["@world"],
91 + options = {"--update": True, "--deep": True},
92 + success = True,
93 + mergelist = []),
94 +
95 + )
96 +
97 + playground = ResolverPlayground(ebuilds=ebuilds,
98 + installed=installed, world=world, debug=False)
99 + try:
100 + for test_case in test_cases:
101 + playground.run_TestCase(test_case)
102 + self.assertEqual(test_case.test_success, True, test_case.fail_msg)
103 + finally:
104 + playground.debug = False
105 + playground.cleanup()