Today, when trying to install app-office/libreoffice-bin-6.4.6.2-r1 I noticed that emerge was failing due to slot version not satisfied. Digging to the issue I found out: * I have =dev-libs/boost-1.74.0 installed * Libreoffice bin depends on dev-libs/boost:0/1.72.0 * Have other software using boost, like for example dev-cpp/lucene++ depending on dev-libs/boost:= If I manually emerge =dev-libs/boost-1.72.0-r1, then do a emerge @preserved-rebuild I can install this version of libreoffice-bin So, if libreoffice-bin needs exactly 1.72.0 version, and all the others just need the same slot without any version forcing, why can't portage just select this version and trigger rebuild force of affected packages instead of just failing? Reproducible: Always
Created attachment 661266 [details] emerge --info output
This is the exact error message: !!! Multiple package instances within a single package slot have been pulled !!! into the dependency graph, resulting in a slot conflict: dev-libs/boost:0 (dev-libs/boost-1.72.0-r1:0/1.72.0::gentoo, ebuild scheduled for merge) USE="bzip2 icu lzma nls python threads zlib zstd -context -debug -doc -mpi -numpy -static-libs -tools" ABI_X86="(64) -32 (-x32)" PYTHON_TARGETS="python3_7 -python2_7 -python3_6 -python3_8" pulled in by dev-libs/boost:0/1.72.0 required by (app-office/libreoffice-bin-6.4.6.2-r1:0/0::gentoo, ebuild scheduled for merge) USE="-gnome -java -kde" ABI_X86="(64)" PYTHON_SINGLE_TARGET="python3_7" ^^^^^^^^^ (dev-libs/boost-1.74.0:0/1.74.0::gentoo, installed) USE="bzip2 icu lzma nls python threads zlib zstd -context -debug -doc -mpi -numpy -static-libs -tools" ABI_X86="(64) -32 (-x32)" PYTHON_TARGETS="python3_7 -python2_7 -python3_6 -python3_8 -python3_9" pulled in by dev-libs/boost:0/1.74.0= required by (dev-cpp/lucene++-3.0.7-r2:0/0::gentoo, installed) USE="-debug" ABI_X86="(64)" ^^^^^^^^^^ >=dev-libs/boost-1.60:0/1.74.0= required by (media-video/mkvtoolnix-49.0.0:0/0::gentoo, installed) USE="dbus dvd nls pch qt5 -debug -test" ABI_X86="(64)" ^^^^^^^^^^ >=dev-libs/boost-1.62.0:0/1.74.0=[threads] required by (dev-util/source-highlight-3.1.9:0/0::gentoo, installed) USE="-doc -static-libs" ABI_X86="(64)" ^^^^^^^^^^ dev-libs/boost:0/1.74.0=[nls] required by (app-i18n/poedit-2.3.1:0/0::gentoo, installed) USE="" ABI_X86="(64)" ^^^^^^^^^^
Also, the error message is missleading, for example, it says: dev-libs/boost:0/1.74.0=[nls] required by (app-i18n/poedit-2.3.1:0/0::gentoo, installed) USE="" ABI_X86="(64)" But inspecting poedit ebuild, I could find that the dependency is not :0/1.74.0 as it suggest the message, but rather it is dev-libs/boost:=[nls] In my opinion, the message is missleading as make := appear as a concrete slot-version dep, which is not true.
I would suggest a slot dependency check as something like the following (that is inspired in current case): Make a list of slot-version specific packages, in this case it would be something like: media-video/mkvtoolnix -> dev-libs/boost:= dev-cpp/lucene++ -> dev-libs/boost:= dev-util/source-highlight -> dev-libs/boost:= app-i18n/poedit -> dev-libs/boost:= app-office/libreoffice-bin -> dev-libs/boost:0/1.72.0 Now extract version specific requirements: * If there are none, continue * If there is exactly one, put that in the emerge list, and force rebuild the rest * If there are more, fail with current message Would something like this make sense?
This looks like a possible duplicate of bug 559354 in the sense that a command like `emerge libreoffice-bin` does not give emerge permission to rebuild reverse dependencies of boost, whereas a command like `emerge -uD @world libreoffice-bin` would give it permission to rebuild anything necessary. (In reply to David Carlos Manuelda from comment #3) > But inspecting poedit ebuild, I could find that the dependency is not > :0/1.74.0 as it suggest the message, but rather it is dev-libs/boost:=[nls] The expansion from dev-libs/boost:=[nls] to dev-libs/boost:0/1.74.0=[nls] at build time is an intentional behavior which is specified by PMS: https://dev.gentoo.org/~ulm/pms/head/pms.html#x1-820008.3.3 The dev-libs/boost:0/1.74.0=[nls] dependency indicates which version of boost your installed version of app-i18n/poedit was built against, and it has to rebuilt when you upgrade to a significantly different version of boost.
(In reply to David Carlos Manuelda from comment #4) > Now extract version specific requirements: > > * If there are none, continue > * If there is exactly one, put that in the emerge list, and force rebuild > the rest > * If there are more, fail with current message > > Would something like this make sense? Yeah, `emerge -uD @world libreoffice-bin` would do something like that. The problem is that a command like `emerge libreoffice-bin` does not give permission to rebuild reverse dependencies of boost (see bug 559354).
Thanks for your quick reply! In fact, looking at the bug you pointed to, seems this is related or even yes, a duplicate. You started it with a "It's common for users to assume that they can run `emerge -u foo` and have it succeed" And yes, seems it is common as I thought also like that :)
Anyway Zac, can the message be improved to point out that manual action is available? That would save a lot of time digging into the ebuilds to see whether a package depends on an specific slot or it was just as you said, expanded at runtime?
(In reply to David Carlos Manuelda from comment #8) > Anyway Zac, can the message be improved to point out that manual action is > available? That would save a lot of time digging into the ebuilds to see > whether a package depends on an specific slot or it was just as you said, > expanded at runtime? The two cases are already distinguishable in the output. For example, compare these two boost dependencies: dev-libs/boost:0/1.72.0 required by (app-office/libreoffice-bin-6.4.6.2-r1:0/0::gentoo, ebuild scheduled for merge) USE="-gnome -java -kde" ABI_X86="(64)" PYTHON_SINGLE_TARGET="python3_7" ^^^^^^^^^ dev-libs/boost:0/1.74.0= required by (dev-cpp/lucene++-3.0.7-r2:0/0::gentoo, installed) USE="-debug" ABI_X86="(64)" ^^^^^^^^^^ The one that was expanded at build time was dev-libs/boost:0/1.74.0=, indicated by the trailing '=' character which indicates that it's an expansion of dev-libs/boost:= (slot operator). The emerge man page has some documentation for the := slot operator. I suppose we could give a short warning message that refers to the := slot operator documentation whenever a slot operator dependency like this is displayed.