Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 520856 - Portage >=2.2.9: Dependency resolver fails to handle update of media-libs/openjpeg (2.0.0:2/2 -> 2.1.0:2/7) + media-gfx/imagemagick (6.8.8.10-r1:0/6.8.8.10 -> 6.8.9.7:0/6.8.9.7)
Summary: Portage >=2.2.9: Dependency resolver fails to handle update of media-libs/ope...
Status: RESOLVED DUPLICATE of bug 508762
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Dependencies (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2014-08-25 18:18 UTC by Arfrever Frehtes Taifersar Arahesis
Modified: 2014-09-01 16:45 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge -ptv --backtrack=1000000 ">=media-libs/openjpeg-2.1:2" ">=media-gfx/imagemagick-6.8.9" (emerge_1,2.60 KB, text/plain)
2014-08-25 18:22 UTC, Arfrever Frehtes Taifersar Arahesis
Details
emerge -dptv --backtrack=1000000 ">=media-libs/openjpeg-2.1:2" ">=media-gfx/imagemagick-6.8.9" (emerge_1_debug.xz,336.46 KB, application/x-xz)
2014-08-25 18:23 UTC, Arfrever Frehtes Taifersar Arahesis
Details
emerge -ptv --backtrack=1000000 ">=media-libs/openjpeg-2.1:2" ">=media-gfx/imagemagick-6.8.9" (emerge_2,1.61 KB, text/plain)
2014-08-25 18:25 UTC, Arfrever Frehtes Taifersar Arahesis
Details
_slot_operator_update_probe: fix bug #520856 (slot_operator_update_probe-fix-bug-520856.patch,2.79 KB, patch)
2014-08-30 07:27 UTC, Zac Medico
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Arfrever Frehtes Taifersar Arahesis 2014-08-25 18:18:32 UTC
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.
Comment 1 Arfrever Frehtes Taifersar Arahesis 2014-08-25 18:22:18 UTC
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)
Comment 2 Arfrever Frehtes Taifersar Arahesis 2014-08-25 18:23:53 UTC
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)
Comment 3 Arfrever Frehtes Taifersar Arahesis 2014-08-25 18:25:56 UTC
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.
Comment 4 Zac Medico gentoo-dev 2014-08-29 06:03:30 UTC
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)?
Comment 5 Zac Medico gentoo-dev 2014-08-30 03:53:46 UTC
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.
Comment 6 Zac Medico gentoo-dev 2014-08-30 07:27:29 UTC
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.
Comment 7 Zac Medico gentoo-dev 2014-09-01 16:40:47 UTC

*** This bug has been marked as a duplicate of bug 508762 ***