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