In order to install dev-java/icedtea-bin, I once put the following lines in /etc/portage/package.use: dev-java/icedtea-bin -webstart headless-awt app-text/ghostscript-gpl cups Today I ran my routine update/check process: # (no emerge --sync here) emerge -av --update --deep --newrepo --newuse --changed-deps @world emerge -av --depclean # note this (no errors happened) Then I removed this line from /etc/portage/package.use: app-text/ghostscript-gpl cups And re-ran: ~ # emerge -av --update --deep --newrepo --newuse --changed-deps @world These are the packages that would be merged, in order: Calculating dependencies... done! Total: 0 packages, Size of downloads: 0 KiB Nothing to merge; quitting. To be frank, I expected an error, so in doubt, I tried the following: ~ # emerge -av1 app-text/ghostscript-gpl These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild R ] app-text/ghostscript-gpl-9.21 USE="-cups*" !!! Multiple package instances within a single package slot have been pulled !!! into the dependency graph, resulting in a slot conflict: app-text/ghostscript-gpl:0 (app-text/ghostscript-gpl-9.21:0/0::gentoo, ebuild scheduled for merge) pulled in by app-text/ghostscript-gpl (Argument) (app-text/ghostscript-gpl-9.21:0/0::gentoo, installed) pulled in by >=app-text/ghostscript-gpl-9.09[cups] required by (net-print/cups-filters-1.17.9:0/0::gentoo, installed) ^^^^ It might be possible to solve this slot collision by applying all of the following changes: - app-text/ghostscript-gpl-9.21 (Change USE: +cups) My portage tree wasn't super fresh, and this was portage 2.3.19. So I updated: emerge -av --sync # this told me a new version of portage was available emerge -av1 portage # this updated 2.3.19 -> 2.3.24 emerge -av --update --deep --newrepo --newuse --changed-deps @world emerge -av --depclean # note this (no errors happened running all of this) Re-running emerge -av1 app-text/ghostscript-gpl produces the same result as previously (character for character, I ran diff on the two outputs). And, the output of `emerge -epv @world`, which does not produce any error, does not include ghostscript-gpl. It does however include cups-filters, which pulls ghostscript-gpl: ~ # emerge -cpv ghostscript-gpl Calculating dependencies... done! app-text/ghostscript-gpl-9.21 pulled in by: net-print/cups-filters-1.17.9 requires >=app-text/ghostscript-gpl-9.09[cups] >>> No packages selected for removal by depclean Packages installed: 509 Packages in world: 88 Packages in system: 44 Required packages: 509 Number to remove: 0 If I put "app-text/ghostscript-gpl cups" back into /etc/portage/package.use, then `emerge -epv @world` includes ghostscript-gpl as expected. Possibly related: https://bugs.gentoo.org/show_bug.cgi?id=559224
This is practically the same issue as bug 266836, just triggered by --emptytree instead of --newuse.
This problem is well understood, it's due to the depgraph _add_dep method trying very hard to satisfy dependencies: https://gitweb.gentoo.org/proj/portage.git/tree/pym/_emerge/depgraph.py?h=portage-2.3.26#n2765 Rather than come up empty-handed, it selects an installed package to satisfy the dependency. This sort of behavior could be desirable in some cases. For example, consider that some people might want to be able to continue despite an ebuild or binary package unavailable, while the installed instance satisfies the dependency. We should definitely provide an option to make emerge bail out here, though.
See this code where for --emptytree it does not pass up the installed package if the matched_packages list is empty: https://gitweb.gentoo.org/proj/portage.git/tree/pym/_emerge/depgraph.py?h=portage-2.3.26#n6220 if installed and not find_existing_node: want_reinstall = reinstall or empty or \ (found_available_arg and not selective) if want_reinstall and matched_packages: continue If you want emerge to bail out, you need to reject that installed package.
*** Bug 653970 has been marked as a duplicate of this bug. ***