When installing binary packages, without --deep, binary packages built against an older subslot can trigger downgrade of an installed package. This happens because the depgraph _slot_operator_trigger_reinstalls method only calls _slot_operator_update_probe when dep.want_update is True, and dep.want_update may be False for a binary package that was built against an older subslot. This patch solves the problem: > diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py > index 160ea5e94..54f00b43d 100644 > --- a/pym/_emerge/depgraph.py > +++ b/pym/_emerge/depgraph.py > @@ -3111,7 +3111,8 @@ class depgraph(object): > deep = self._dynamic_config.myparams.get("deep", 0) > update = "--update" in self._frozen_config.myopts > > - dep.want_update = (not self._dynamic_config._complete_mode and > + dep.want_update = not pkg.installed or ( > + not self._dynamic_config._complete_mode and > (arg_atoms or update) and > not self._too_deep(depth)) >
Patch posted for review: https://archives.gentoo.org/gentoo-portage-dev/message/7c0e9b1db6c29b861d33c6bd21606a79 https://github.com/gentoo/portage/pull/297
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage.git/commit/?id=600b329949f8770fe2962987ee97567b65393c7e commit 600b329949f8770fe2962987ee97567b65393c7e Author: Zac Medico <zmedico@gentoo.org> AuthorDate: 2018-04-10 21:29:44 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2018-04-12 02:43:47 +0000 _slot_operator.._reinstalls: probe binpkg rebuild (bug 652938) If the parent is not installed, check if it needs to be rebuilt against an installed instance, since otherwise it could trigger downgrade of an installed instance. Bug: https://bugs.gentoo.org/652938 Reviewed-by: Manuel Rüger <mrueg@gentoo.org> pym/_emerge/depgraph.py | 10 ++++- .../tests/resolver/test_slot_operator_rebuild.py | 45 +++++++++++++++++++++- 2 files changed, 51 insertions(+), 4 deletions(-)}
Fixed in portage-2.3.40-r1.