Gentoo Archives: gentoo-portage-dev

From: Zac Medico <zmedico@g.o>
To: gentoo-portage-dev@l.g.o
Cc: Zac Medico <zmedico@g.o>
Subject: [gentoo-portage-dev] [PATCH] dephgraph: Allow elimination of highest version after slot conflict (bug 439688)
Date: Sun, 30 Aug 2020 23:43:02
Message-Id: 20200830234235.214685-1-zmedico@gentoo.org
1 After a slot conflict occurs, allow the highest version to be eliminated
2 from the graph when appropriate. This is needed for correct behavior in
3 cases the highest version cannot be installed because an older version
4 is required by some package. This reverts a change related to bug 531656
5 from commit a9064d08ef4c92a5d0d1bfb3dc8a01b7850812b0, and that change
6 no longer appears to be necessary, since the unit tests related to bug
7 531656 now pass without it.
8
9 Due to this change in slot conflict handling, the --changed-slot test
10 case related to bug 456208 will now fail unless we use an @world update to
11 trigger rebuilds, therefore fix it to do so.
12
13 Bug: https://bugs.gentoo.org/439688
14 Signed-off-by: Zac Medico <zmedico@g.o>
15 ---
16 lib/_emerge/depgraph.py | 9 ---------
17 .../tests/resolver/test_slot_change_without_revbump.py | 4 ++--
18 lib/portage/tests/resolver/test_slot_conflict_rebuild.py | 3 ---
19 3 files changed, 2 insertions(+), 14 deletions(-)
20
21 diff --git a/lib/_emerge/depgraph.py b/lib/_emerge/depgraph.py
22 index e071be8df..3f864aefc 100644
23 --- a/lib/_emerge/depgraph.py
24 +++ b/lib/_emerge/depgraph.py
25 @@ -1501,15 +1501,6 @@ class depgraph:
26
27 matched = []
28 for pkg in conflict:
29 - if (pkg is highest_pkg and
30 - not highest_pkg.installed and
31 - inst_pkg is not None and
32 - inst_pkg.sub_slot != highest_pkg.sub_slot and
33 - not self._downgrade_probe(highest_pkg)):
34 - # If an upgrade is desired, force the highest
35 - # version into the graph (bug #531656).
36 - non_matching_forced.add(highest_pkg)
37 -
38 if atom.match(pkg.with_use(
39 self._pkg_use_enabled(pkg))) and \
40 not (is_arg_parent and pkg.installed):
41 diff --git a/lib/portage/tests/resolver/test_slot_change_without_revbump.py b/lib/portage/tests/resolver/test_slot_change_without_revbump.py
42 index 5cd8c53d1..e05705671 100644
43 --- a/lib/portage/tests/resolver/test_slot_change_without_revbump.py
44 +++ b/lib/portage/tests/resolver/test_slot_change_without_revbump.py
45 @@ -71,8 +71,8 @@ class SlotChangeWithoutRevBumpTestCase(TestCase):
46
47 # Test --changed-slot
48 ResolverPlaygroundTestCase(
49 - ["app-arch/libarchive"],
50 - options = {"--changed-slot": True, "--usepkg": True},
51 + ["@world"],
52 + options = {"--changed-slot": True, "--usepkg": True, "--update": True, "--deep": True},
53 success = True,
54 mergelist = ["app-arch/libarchive-3.1.1", "kde-base/ark-4.10.0"]),
55
56 diff --git a/lib/portage/tests/resolver/test_slot_conflict_rebuild.py b/lib/portage/tests/resolver/test_slot_conflict_rebuild.py
57 index b3bcf44d0..d650d42ae 100644
58 --- a/lib/portage/tests/resolver/test_slot_conflict_rebuild.py
59 +++ b/lib/portage/tests/resolver/test_slot_conflict_rebuild.py
60 @@ -454,10 +454,7 @@ class SlotConflictRebuildTestCase(TestCase):
61 finally:
62 playground.cleanup()
63
64 -class SlotConflictRebuildGolangTestCase(TestCase):
65 -
66 def testSlotConflictRebuildGolang(self):
67 - self.todo = True
68
69 ebuilds = {
70
71 --
72 2.25.3