I use Portage trunk (2.2.12_p8; 5c0f68017e9943f9486ee68005ea3ef7743244bd). Dependency resolver fails to handle update of media-libs/openjpeg and media-gfx/imagemagick. media-libs/openjpeg-2.0.0:2/2 is installed and update to media-libs/openjpeg-2.1.0:2/7 is available. media-gfx/imagemagick-6.8.8.10-r1:0/6.8.8.10 is installed and update to media-gfx/imagemagick-6.8.9.7:0/6.8.9.7 is available. So there are subslot changes in both these packages. media-gfx/imagemagick has optional dependency on media-libs/openjpeg, controlled by "jpeg2k" USE flag, which is enabled. This bug was introduced in Portage 2.2.9.
Created attachment 383570 [details] emerge -ptv --backtrack=1000000 ">=media-libs/openjpeg-2.1:2" ">=media-gfx/imagemagick-6.8.9" Output of: emerge -ptv --backtrack=1000000 ">=media-libs/openjpeg-2.1:2" ">=media-gfx/imagemagick-6.8.9" (Portage trunk)
Created attachment 383572 [details] emerge -dptv --backtrack=1000000 ">=media-libs/openjpeg-2.1:2" ">=media-gfx/imagemagick-6.8.9" Output of: emerge -dptv --backtrack=1000000 ">=media-libs/openjpeg-2.1:2" ">=media-gfx/imagemagick-6.8.9" (Portage trunk)
Created attachment 383576 [details] emerge -ptv --backtrack=1000000 ">=media-libs/openjpeg-2.1:2" ">=media-gfx/imagemagick-6.8.9" Output of: emerge -ptv --backtrack=1000000 ">=media-libs/openjpeg-2.1:2" ">=media-gfx/imagemagick-6.8.9" (Portage 2.2.8) This output shows absence of problems related to media-libs/openjpeg and media-gfx/imagemagick when using Portage 2.2.8.
Using your config from bug 515230, I can't reproduce this with 5c0f68017e9943f9486ee68005ea3ef7743244bd. Does the calculation succeed if you force the packages that need to be rebuilt via the command line (--oneshot =dev-python/pythonmagick-0.9.10-r1000 =sci-mathematics/octave-3.8.1-r1 =dev-python/imaging-2.5.3-r1000)?
I can reproduce this using your config with the 20140828 gentoo-x86 snapshot, and head of the current portage trunk (617a64f77055ddda1dd86a506cf98f5adc545fae). Here is some debugger info about the state that leads to the incorrect behavior: pym/_emerge/depgraph.py(6265)altlist() -> self._resolve_conflicts() pym/_emerge/depgraph.py(6392)_resolve_conflicts() -> self._process_slot_conflicts() pym/_emerge/depgraph.py(1244)_process_slot_conflicts() -> self._process_slot_conflict(conflict) pym/_emerge/depgraph.py(1308)_process_slot_conflict() -> slot_nodes, conflict_atoms): pym/_emerge/depgraph.py(1386)_slot_conflict_backtrack_abi() -> self._slot_operator_update_probe_slot_conflict(dep) pym/_emerge/depgraph.py(1527)_slot_operator_update_probe_slot_conflict() -> new_dep = self._slot_operator_update_probe(dep, slot_conflict=True) pym/_emerge/depgraph.py(1696)_slot_operator_update_probe() -> check_reverse_dependencies(dep.child, pkg): > pym/_emerge/depgraph.py(1583)check_reverse_dependencies() -> return False (Pdb) p candidate_pkg <Package ('ebuild', '/', 'media-libs/openjpeg-2.1.0', 'merge', 'gentoo')> (Pdb) p existing_pkg <Package ('installed', '/', 'media-libs/openjpeg-2.0.0', 'nomerge', 'installed')> (Pdb) p parent <Package ('installed', '/', 'media-gfx/imagemagick-6.8.8.10-r1', 'nomerge', 'installed')> (Pdb) p atom u'<media-libs/openjpeg-2.1.0:2' This shows that check_reverse_dependencies is rejecting the unbuilt media-libs/openjpeg-2.1.0 candidate_pkg because it does not match the parent atom from the installed media-gfx/imagemagick-6.8.8.10-r1 package. I will look into writing a patch to correct this behavior.
Created attachment 383946 [details, diff] _slot_operator_update_probe: fix bug #520856 This fixes the check_reverse_dependencies function (inside the depgraph _slot_operator_update_probe method) to account for irrelevent parent atoms from parents that need to be rebuilt or have been involved in unsolved slot conflicts.
*** This bug has been marked as a duplicate of bug 508762 ***