User:Kentnl/Tips/Fixing slot conflicts

TL;DR version
 See a slot conflict error !!! Multiple package instances within a single package slot have been pulled !!! into the dependency graph, resulting in a slot conflict Have a good cry over it Find one "Target" in the problem group: dev-libs/boost:0

(dev-libs/boost-1.65.0:0/1.65.0::gentoo, installed) pulled in by   >=dev-libs/boost-1.50.0:0/1.65.0=[threads(+)] required by (media-gfx/povray-3.7.0.0-r1:0/0::gentoo, installed) ^^^^^^^^^^                                                                                                                    dev-libs/boost:0/1.65.0=[python,python_targets_python3_6(-),-python_single_target_python2_7(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] required by (net-libs/libtorrent-rasterbar-1.1.13:0/9::gentoo, installed) ^^^^^^^^^^                                                                                                                                                                                                                                                              dev-libs/boost:0/1.65.0=[nls] required by (app-office/libreoffice-6.2.4.2:0/0::gentoo, installed) ^^^^^^^^^^                                                                                                                dev-libs/boost:0/1.65.0= required by (dev-cpp/libcmis-0.5.2-r1:0.5/0.5::gentoo, installed) ^^^^^^^^^^                                                                                                         dev-libs/boost:0/1.65.0= required by (dev-libs/liborcus-0.14.1:0/0.14::gentoo, installed) ^^^^^^^^^^                                                                                                        >=dev-libs/boost-1.62.0-r1:0/1.65.0= required by (net-p2p/qbittorrent-9999:0/0::gentoo, installed) ^^^^^^^^^^                                                                                                     >=dev-libs/boost-1.42:0/1.65.0= required by (sys-fs/e4rat-0.2.4_pre20141201-r1:0/0::gentoo, installed) ^^^^^^^^^^                                                                                                              dev-libs/boost:0/1.65.0= required by (media-gfx/luminance-hdr-2.5.1-r1:0/0::gentoo, installed) ^^^^^^^^^^                                                                                                             dev-libs/boost:0/1.65.0= required by (dev-util/mdds-1.4.3:1/1.4::gentoo, installed) ^^^^^^^^^^                                                                                                  dev-libs/boost:0/1.65.0=[abi_x86_32(-),abi_x86_64(-),threads] required by (net-libs/nghttp2-1.39.1:0/1.14::gentoo, installed) ^^^^^^^^^^                                                                                                                                            dev-libs/boost:0/1.65.0=[threads] required by (net-libs/libtorrent-rasterbar-1.1.13:0/9::gentoo, installed) ^^^^^^^^^^                                                                                                                          dev-libs/boost:0/1.65.0= required by (dev-libs/libixion-0.14.1:0/0.14::gentoo, installed) ^^^^^^^^^^

(dev-libs/boost-1.70.0:0/1.70.0::gentoo, ebuild scheduled for merge) pulled in by   >=dev-libs/boost-1.65.1:= required by (sys-fs/cryfs-0.10.2:0/0::gentoo, ebuild scheduled for merge) ^^              ^^^^^^                                                                              Work out what "final slot" you want to have insalled (dev-libs/boost-1.65.0:0/1.65.0::gentoo, installed) (dev-libs/boost-1.70.0:0/1.70.0::gentoo, ebuild scheduled for merge) ^^^^^^ Find all the packages installed that need to reinstalled to satisfy the above qdepends -Qqq -F '%{CAT}/%{PN}:%{SLOT}' ^dev-libs/boost:0/1.70.0 app-office/libreoffice:0 media-gfx/luminance-hdr:0 media-gfx/povray:0 net-p2p/qbittorrent:0 sys-fs/e4rat:0 sys-fs/cryfs:0 dev-libs/liborcus:0 dev-libs/libixion:0 dev-cpp/libcmis:0.5 dev-util/mdds:1 net-libs/libtorrent-rasterbar:0 net-libs/nghttp2:0 Note: The  is significant, as is using the package in   syntax. Retaining a package version will break things.

Plead with portage to consider just those packages for reinstallation emerge --ignore-default-opts -va1 $( qdepends -CQqqF'%{CAT}/%{PN}:%{SLOT}' '^dev-libs/boost:0/1.70.0' )

These are the packages that would be merged, in order:

Calculating dependencies... done! [ebuild N     ] dev-util/gperf-3.1::gentoo  0 KiB [ebuild N     ] sys-devel/autoconf-archive-2019.01.06::gentoo  0 KiB [ebuild N     ] dev-libs/libatomic_ops-7.6.10::gentoo  ABI_X86="32 (64) (-x32)" 0 KiB [ebuild N     ] dev-util/re2c-1.1.1::gentoo  0 KiB [ebuild N     ] dev-util/cppunit-1.14.0::gentoo  USE="-doc -examples -static-libs" ABI_X86="32 (64) (-x32)" 0 KiB [ebuild N     ] dev-util/boost-build-1.70.0::gentoo  USE="-examples -python -test" PYTHON_TARGETS="-python2_7" 95,593 KiB [ebuild N     ] sys-devel/ucpp-1.3.4::gentoo  USE="-static-libs" 0 KiB [ebuild N     ] app-portage/elt-patches-20170826.1::gentoo  0 KiB [ebuild N     ] dev-perl/SUPER-1.201.411.170::gentoo  USE="test" 0 KiB [ebuild N     ] dev-perl/Test-MockModule-0.130.0::gentoo  USE="test" 0 KiB [ebuild N     ] dev-perl/Archive-Zip-1.640.0::gentoo  USE="test -examples" 0 KiB [ebuild    U  ] dev-libs/boost-1.70.0:0/1.70.0::gentoo [1.65.0:0/1.65.0::gentoo] USE="bzip2%* nls python threads zlib%* -context -debug -doc -icu -lzma% -mpi -numpy% -static-libs -tools -zstd%" ABI_X86="32 (64) (-x32)" PYTHON_TARGETS="python2_7 python3_6 python3_7%* -python3_5" 0 KiB [ebuild  R    ] dev-util/mdds-1.4.3:1/1.4::gentoo  USE="-doc -valgrind" 0 KiB [ebuild  R    ] net-libs/libtorrent-rasterbar-1.1.13:0/9::gentoo  USE="dht python ssl -debug -doc -examples -libressl -static-libs -test" PYTHON_TARGETS="python3_6 -python2_7 -python3_5" 0 KiB [ebuild  R    ] dev-libs/libixion-0.14.1:0/0.14::gentoo  USE="threads -debug -python -static-libs" PYTHON_SINGLE_TARGET="python3_7 -python3_5 -python3_6" PYTHON_TARGETS="python3_6 python3_7 -python3_5" 0 KiB [ebuild  R    ] dev-libs/liborcus-0.14.1:0/0.14::gentoo  USE="spreadsheet-model -python -static-libs -tools" PYTHON_SINGLE_TARGET="python3_7 -python3_5 -python3_6" PYTHON_TARGETS="python3_6 python3_7 -python3_5" 0 KiB [ebuild N     ] dev-util/ninja-1.9.0::gentoo  USE="vim-syntax -doc -emacs -test" 0 KiB [ebuild  R    ] net-libs/nghttp2-1.39.1:0/1.14::gentoo  USE="cxx threads -debug -hpack-tools -jemalloc -libressl -static-libs -test -utils -xml" ABI_X86="32 (64) (-x32)" 0 KiB [ebuild  R    ] dev-cpp/libcmis-0.5.2-r1:0.5::gentoo  USE="-man -static-libs -test -tools" 0 KiB [ebuild  R   *] net-p2p/qbittorrent-9999::gentoo  USE="X dbus webui -debug" 0 KiB [ebuild N     ] dev-util/intltool-0.51.0-r2::gentoo  0 KiB [ebuild N     ] app-crypt/rhash-1.3.8::gentoo  USE="nls ssl -debug -libressl -static-libs" ABI_X86="32 (64) (-x32)" 0 KiB [ebuild N     ] dev-util/cmake-3.14.5::gentoo  USE="ncurses qt5 -doc -emacs -system-jsoncpp -test" 0 KiB [ebuild  R    ] app-office/libreoffice-6.2.4.2::gentoo  USE="branding dbus gtk mariadb -accessibility -bluetooth -coinmp -cups -debug -eds -firebird -googledrive -gstreamer -gtk2 -java -kde -ldap -odk -pdfimport -postgres -test -vlc" LIBREOFFICE_EXTENSIONS="-nlpsolver -scripting-beanshell -scripting-javascript -wiki-publisher" PYTHON_SINGLE_TARGET="python3_7 -python2_7 -python3_5 -python3_6" PYTHON_TARGETS="python3_6 python3_7 -python2_7 -python3_5" 0 KiB [ebuild  R    ] sys-fs/e4rat-0.2.4_pre20141201-r1::gentoo  0 KiB [ebuild    U  ] sys-fs/cryfs-0.10.2::gentoo [0.9.9::gentoo] USE="-custom-optimization -debug% -libressl -test (-update-check%)" 7,718 KiB [ebuild  R    ] media-gfx/povray-3.7.0.0-r1::gentoo  USE="X io-restrictions tiff -debug -openexr -static-libs -test" 0 KiB [ebuild  R    ] media-gfx/luminance-hdr-2.5.1-r1::gentoo  USE="openmp -fits -test" CPU_FLAGS_X86="sse2" L10N="-cs -de -es -fi -fr -hi -hu -id -it -pl -ro -ru -sk -tr -zh" 0 KiB

Total: 28 packages (2 upgrades, 15 new, 11 reinstalls), Size of downloads: 103,310 KiB

WARNING: One or more updates/rebuilds have been skipped due to a dependency conflict:

net-libs/libtorrent-rasterbar:0

(net-libs/libtorrent-rasterbar-1.2.1:0/9::gentoo, ebuild scheduled for merge) conflicts with =net-libs/libtorrent-rasterbar-1.1*:0= required by (net-p2p/qbittorrent-9999:0/0::gentoo, ebuild scheduled for merge) ^                             ^^^^

Would you like to merge these packages? [Yes/No] Observe that the thing that needed upgrading can now be upgraded, the things that need to be rebuilt are scheduled to be rebuilt, and portage now provides a merge plan. Praise jebus? 

Note: this strategy won't always work for all cases, but it gets portage past the stupid problems it should be quite capable of its own and thus reduces you to solving the RealProblems&trade;

Caveats
 You need Some packages my fail to do any upgrades without additional hand-holding, despite producing a merge plan: merge --ignore-default-opts -va1 --keep-going $( qdepends -CQqqF '%{CAT}/%{PN}:%{SLOT}' '^media-gfx/imagemagick:0/7.0.8.50' )

These are the packages that would be merged, in order:

Calculating dependencies... done! [ebuild  R    ] media-gfx/uniconvertor-2.0_pre379-r2::gentoo  PYTHON_TARGETS="python2_7" 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB

Would you like to merge these packages? [Yes/No] n Just yell at portage some more: emerge --ignore-default-opts -va1 --keep-going $( qdepends -CQqqF '%{CAT}/%{PN}:%{SLOT}' '^media-gfx/imagemagick:0/7.0.8.50' ) media-gfx/imagemagick

These are the packages that would be merged, in order:

Calculating dependencies... done! [ebuild    U  ] media-gfx/imagemagick-7.0.8.50:0/7.0.8.50::gentoo [7.0.8.49:0/7.0.8.49::gentoo] USE="X bzip2 corefonts cxx fftw fontconfig graphviz hdri jpeg jpeg2k lcms lqr lzma openexr openmp pango perl png postscript raw svg tiff truetype webp wmf xml zlib -djvu -fpx -heif -jbig -opencl -q32 -q8 -static-libs -test" 9,232 KiB [ebuild  R    ] media-gfx/uniconvertor-2.0_pre379-r2::gentoo  PYTHON_TARGETS="python2_7" 0 KiB

Total: 2 packages (1 upgrade, 1 reinstall), Size of downloads: 9,232 KiB

Would you like to merge these packages? [Yes/No] y