It's possible for the depgraph _solve_non_slot_operator_slot_conflicts to eliminate packages that @preserved-rebuild has selected for rebuild. In this case, it's better to allow the conflict to be resolved by backtracking, which will ultimately choose a version to build that doesn't trigger a conflict. This quick-and-dirty patch solved the problem for me: diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index 785c036b8..2afbc7b9c 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -1336,6 +1336,13 @@ class depgraph(object): all_parent_atoms.update( self._dynamic_config._parent_atoms.get(pkg, [])) + if (inst_pkg is not None and + not self._want_installed_pkg(inst_pkg)): + for pkg in sorted(conflict, reverse=True): + if not pkg.installed: + non_matching_forced.add(pkg) + break + for parent, atom in all_parent_atoms: is_arg_parent = isinstance(parent, AtomArg) is_non_conflict_parent = parent not in conflict_pkgs and \
This fix is better but it makes SlotConflictUpdateTestCase fail the same way as bug 632210: diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index 785c036b8..f0de40178 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -1337,7 +1337,8 @@ class depgraph(object): self._dynamic_config._parent_atoms.get(pkg, [])) for parent, atom in all_parent_atoms: - is_arg_parent = isinstance(parent, AtomArg) + is_arg_parent = (inst_pkg is not None and + not self._want_installed_pkg(inst_pkg))
Patch sent for review: https://github.com/gentoo/portage/pull/211
This is in the master branch: https://gitweb.gentoo.org/proj/portage.git/commit/?id=d82bf7c0a2cfa9590849aa7fd3ea1257a7f45006
Released in 2.3.11.