Re: [gentoo-portage-dev] [PATCH] depgraph: select highest version involved in slot conflict (bug 554070)
On 12/04/2016 07:43 PM, Brian Dolbec wrote: > On Sun, 4 Dec 2016 18:54:37 -0800 > Zac Medicowrote: > >> Fix depgraph's package selection logic to choose the highest version >> involved in a slot conflict, for correct operation of >> conflict_downgrade logic in the dep_zapdeps function which was >> introduced in commit a9064d08ef4c92a5d0d1bfb3dc8a01b7850812b0. This >> will prevent incorrect re-ordering of || deps in dep_zapdeps, as >> reported in bug 554070. >> >> X-Gentoo-Bug: 554070 >> X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=554070 >> Fixes a9064d08ef4c ("Solve more slot-operator conflicts (531656)") >> --- >> pym/_emerge/depgraph.py | 11 +-- >> 1 file changed, 9 insertions(+), 2 deletions(-) >> >> diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py >> index 9161914..ee6cf68 100644 >> --- a/pym/_emerge/depgraph.py >> +++ b/pym/_emerge/depgraph.py >> @@ -6071,8 +6071,15 @@ class depgraph(object): >> # will always end with a >> break statement below # this point. >> if find_existing_node: >> -e_pkg = >> next(self._dynamic_config._package_tracker.match( >> -root, >> pkg.slot_atom, installed=False), None) >> +# Use reversed >> iteration in order to get >> +# descending order >> here, so that the highest >> +# version involved >> in a slot conflict is >> +# selected. This is >> needed for correct operation >> +# of >> conflict_downgrade logic in the dep_zapdeps >> +# function (see bug >> 554070). >> +e_pkg = >> next(reversed(list( >> + >> self._dynamic_config._package_tracker.match( >> +root, >> pkg.slot_atom, installed=False))), None) >> if not e_pkg: >> break > > LGTM > Pushed: https://gitweb.gentoo.org/proj/portage.git/commit/?id=ab07ac68fa1e04ed64e2e0f6c753ff169a32d517 -- Thanks, Zac
Re: [gentoo-portage-dev] [PATCH] depgraph: select highest version involved in slot conflict (bug 554070)
On Sun, 4 Dec 2016 18:54:37 -0800 Zac Medicowrote: > Fix depgraph's package selection logic to choose the highest version > involved in a slot conflict, for correct operation of > conflict_downgrade logic in the dep_zapdeps function which was > introduced in commit a9064d08ef4c92a5d0d1bfb3dc8a01b7850812b0. This > will prevent incorrect re-ordering of || deps in dep_zapdeps, as > reported in bug 554070. > > X-Gentoo-Bug: 554070 > X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=554070 > Fixes a9064d08ef4c ("Solve more slot-operator conflicts (531656)") > --- > pym/_emerge/depgraph.py | 11 +-- > 1 file changed, 9 insertions(+), 2 deletions(-) > > diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py > index 9161914..ee6cf68 100644 > --- a/pym/_emerge/depgraph.py > +++ b/pym/_emerge/depgraph.py > @@ -6071,8 +6071,15 @@ class depgraph(object): > # will always end with a > break statement below # this point. > if find_existing_node: > - e_pkg = > next(self._dynamic_config._package_tracker.match( > - root, > pkg.slot_atom, installed=False), None) > + # Use reversed > iteration in order to get > + # descending order > here, so that the highest > + # version involved > in a slot conflict is > + # selected. This is > needed for correct operation > + # of > conflict_downgrade logic in the dep_zapdeps > + # function (see bug > 554070). > + e_pkg = > next(reversed(list( > + > self._dynamic_config._package_tracker.match( > + root, > pkg.slot_atom, installed=False))), None) > if not e_pkg: > break LGTM -- Brian Dolbec
[gentoo-portage-dev] [PATCH] depgraph: select highest version involved in slot conflict (bug 554070)
Fix depgraph's package selection logic to choose the highest version involved in a slot conflict, for correct operation of conflict_downgrade logic in the dep_zapdeps function which was introduced in commit a9064d08ef4c92a5d0d1bfb3dc8a01b7850812b0. This will prevent incorrect re-ordering of || deps in dep_zapdeps, as reported in bug 554070. X-Gentoo-Bug: 554070 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=554070 Fixes a9064d08ef4c ("Solve more slot-operator conflicts (531656)") --- pym/_emerge/depgraph.py | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index 9161914..ee6cf68 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -6071,8 +6071,15 @@ class depgraph(object): # will always end with a break statement below # this point. if find_existing_node: - e_pkg = next(self._dynamic_config._package_tracker.match( - root, pkg.slot_atom, installed=False), None) + # Use reversed iteration in order to get + # descending order here, so that the highest + # version involved in a slot conflict is + # selected. This is needed for correct operation + # of conflict_downgrade logic in the dep_zapdeps + # function (see bug 554070). + e_pkg = next(reversed(list( + self._dynamic_config._package_tracker.match( + root, pkg.slot_atom, installed=False))), None) if not e_pkg: break -- 2.7.4