1 |
Fix depgraph's package selection logic to choose the highest version |
2 |
involved in a slot conflict, for correct operation of conflict_downgrade |
3 |
logic in the dep_zapdeps function which was introduced in commit |
4 |
a9064d08ef4c92a5d0d1bfb3dc8a01b7850812b0. This will prevent incorrect |
5 |
re-ordering of || deps in dep_zapdeps, as reported in bug 554070. |
6 |
|
7 |
X-Gentoo-Bug: 554070 |
8 |
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=554070 |
9 |
Fixes a9064d08ef4c ("Solve more slot-operator conflicts (531656)") |
10 |
--- |
11 |
pym/_emerge/depgraph.py | 11 +++++++++-- |
12 |
1 file changed, 9 insertions(+), 2 deletions(-) |
13 |
|
14 |
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py |
15 |
index 9161914..ee6cf68 100644 |
16 |
--- a/pym/_emerge/depgraph.py |
17 |
+++ b/pym/_emerge/depgraph.py |
18 |
@@ -6071,8 +6071,15 @@ class depgraph(object): |
19 |
# will always end with a break statement below |
20 |
# this point. |
21 |
if find_existing_node: |
22 |
- e_pkg = next(self._dynamic_config._package_tracker.match( |
23 |
- root, pkg.slot_atom, installed=False), None) |
24 |
+ # Use reversed iteration in order to get |
25 |
+ # descending order here, so that the highest |
26 |
+ # version involved in a slot conflict is |
27 |
+ # selected. This is needed for correct operation |
28 |
+ # of conflict_downgrade logic in the dep_zapdeps |
29 |
+ # function (see bug 554070). |
30 |
+ e_pkg = next(reversed(list( |
31 |
+ self._dynamic_config._package_tracker.match( |
32 |
+ root, pkg.slot_atom, installed=False))), None) |
33 |
|
34 |
if not e_pkg: |
35 |
break |
36 |
-- |
37 |
2.7.4 |