1 |
commit: 0ccb4f0fefa54592f9c90c70c855dbe35d0ede75 |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jun 23 06:18:12 2016 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jun 26 23:49:48 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=0ccb4f0f |
7 |
|
8 |
depgraph: fix missed llvm update (bug 584626) |
9 |
|
10 |
Fix check_reverse_dependencies to ignore dependencies of parent packages |
11 |
for which updates are desirable. This solves a missed llvm update by |
12 |
ignoring a reverse dependency from the installed instance of clang, |
13 |
since an update to a newer version of clang is desirable. |
14 |
|
15 |
In order to cope with this change, there are 2 existing unit tests |
16 |
that require larger --backtrack settings in order to succeed. |
17 |
|
18 |
X-Gentoo-Bug: 584626 |
19 |
X-Gentoo-Bug-url: https://bugs.gentoo.org/show_bug.cgi?id=584626 |
20 |
Acked-by: Brian Dolbec <dolsen <AT> gentoo.org> |
21 |
|
22 |
pym/_emerge/depgraph.py | 21 +++++++++++++++++++++ |
23 |
.../resolver/soname/test_slot_conflict_reinstall.py | 1 + |
24 |
.../tests/resolver/test_slot_conflict_rebuild.py | 2 +- |
25 |
.../resolver/test_slot_operator_reverse_deps.py | 6 +++++- |
26 |
4 files changed, 28 insertions(+), 2 deletions(-) |
27 |
|
28 |
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py |
29 |
index f78f08d..c1c37b4 100644 |
30 |
--- a/pym/_emerge/depgraph.py |
31 |
+++ b/pym/_emerge/depgraph.py |
32 |
@@ -1822,6 +1822,15 @@ class depgraph(object): |
33 |
# necessarily relevant. |
34 |
continue |
35 |
|
36 |
+ if (not self._too_deep(parent.depth) and |
37 |
+ not self._frozen_config.excluded_pkgs. |
38 |
+ findAtomForPackage(parent, |
39 |
+ modified_use=self._pkg_use_enabled(parent)) and |
40 |
+ self._upgrade_available(parent)): |
41 |
+ # This parent may be irrelevant, since an |
42 |
+ # update is available (see bug 584626). |
43 |
+ continue |
44 |
+ |
45 |
atom_set = InternalPackageSet(initial_atoms=(atom,), |
46 |
allow_repo=True) |
47 |
if not atom_set.findAtomForPackage(candidate_pkg, |
48 |
@@ -2113,6 +2122,18 @@ class depgraph(object): |
49 |
|
50 |
self._dynamic_config._need_restart = True |
51 |
|
52 |
+ def _upgrade_available(self, pkg): |
53 |
+ """ |
54 |
+ Detect cases where an upgrade of the given package is available |
55 |
+ within the same slot. |
56 |
+ """ |
57 |
+ for available_pkg in self._iter_similar_available(pkg, |
58 |
+ pkg.slot_atom): |
59 |
+ if available_pkg > pkg: |
60 |
+ return True |
61 |
+ |
62 |
+ return False |
63 |
+ |
64 |
def _downgrade_probe(self, pkg): |
65 |
""" |
66 |
Detect cases where a downgrade of the given package is considered |
67 |
|
68 |
diff --git a/pym/portage/tests/resolver/soname/test_slot_conflict_reinstall.py b/pym/portage/tests/resolver/soname/test_slot_conflict_reinstall.py |
69 |
index 40e6995..f474761 100644 |
70 |
--- a/pym/portage/tests/resolver/soname/test_slot_conflict_reinstall.py |
71 |
+++ b/pym/portage/tests/resolver/soname/test_slot_conflict_reinstall.py |
72 |
@@ -89,6 +89,7 @@ class SonameSlotConflictReinstallTestCase(TestCase): |
73 |
"--ignore-soname-deps": "n", |
74 |
"--update": True, |
75 |
"--usepkgonly": True, |
76 |
+ "--backtrack": 10, |
77 |
}, |
78 |
success = True, |
79 |
mergelist = [ |
80 |
|
81 |
diff --git a/pym/portage/tests/resolver/test_slot_conflict_rebuild.py b/pym/portage/tests/resolver/test_slot_conflict_rebuild.py |
82 |
index b39eaf0..2dfa79c 100644 |
83 |
--- a/pym/portage/tests/resolver/test_slot_conflict_rebuild.py |
84 |
+++ b/pym/portage/tests/resolver/test_slot_conflict_rebuild.py |
85 |
@@ -91,7 +91,7 @@ class SlotConflictRebuildTestCase(TestCase): |
86 |
# upgrade and we don't want to trigger unnecessary rebuilds. |
87 |
ResolverPlaygroundTestCase( |
88 |
["@world"], |
89 |
- options = {"--update": True, "--deep": True}, |
90 |
+ options = {"--update": True, "--deep": True, "--backtrack": 4}, |
91 |
success = True, |
92 |
mergelist = ["app-misc/D-2", "app-misc/E-0"]), |
93 |
|
94 |
|
95 |
diff --git a/pym/portage/tests/resolver/test_slot_operator_reverse_deps.py b/pym/portage/tests/resolver/test_slot_operator_reverse_deps.py |
96 |
index 72879f8..ce614a4 100644 |
97 |
--- a/pym/portage/tests/resolver/test_slot_operator_reverse_deps.py |
98 |
+++ b/pym/portage/tests/resolver/test_slot_operator_reverse_deps.py |
99 |
@@ -79,7 +79,11 @@ class SlotOperatorReverseDepsTestCase(TestCase): |
100 |
["@world"], |
101 |
options = {"--update": True, "--deep": True}, |
102 |
success = True, |
103 |
- mergelist = [], |
104 |
+ mergelist = [ |
105 |
+ 'sys-devel/llvm-3.8.0-r2', |
106 |
+ 'sys-devel/clang-3.8.0-r100', |
107 |
+ 'media-libs/mesa-11.2.2', |
108 |
+ ], |
109 |
), |
110 |
|
111 |
ResolverPlaygroundTestCase( |