Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 656702 - media-libs/mesa-18.1.0-r1 - Detected file collision(s): /usr/lib64/dri/{i965,swrast}_dri.so (with FEATURES=collision-protect)
Summary: media-libs/mesa-18.1.0-r1 - Detected file collision(s): /usr/lib64/dri/{i965,...
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-27 17:56 UTC by Coacher
Modified: 2018-05-27 22:11 UTC (History)
0 users

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


Attachments
emerge --info (info,7.21 KB, text/plain)
2018-05-27 17:56 UTC, Coacher
Details
build.log.gz (build.log.gz,92.44 KB, application/gzip)
2018-05-27 18:01 UTC, Coacher
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Coacher 2018-05-27 17:56:50 UTC
Created attachment 533558 [details]
emerge --info

* checking 51 files for package collisions
 * This package will overwrite one or more files that may belong to other
 * packages (see list below). You can use a command such as `portageq
 * owners / <filename>` to identify the installed package that owns a
 * file. If portageq reports that only one package owns a file then do
 * NOT file a bug report. A bug report is only useful if it identifies at
 * least two or more packages that are known to install the same file(s).
 * If a collision occurs and you can not explain where the file came from
 * then you should simply ignore the collision since there is not enough
 * information to determine if a real problem exists. Please do NOT file
 * a bug report at https://bugs.gentoo.org/ unless you report exactly
 * which two packages install the same file(s). See
 * https://wiki.gentoo.org/wiki/Knowledge_Base:Blockers for tips on how
 * to solve the problem. And once again, please do NOT file a bug report
 * unless you have completely understood the above message.
 * 
 * package media-libs/mesa-18.1.0-r1 NOT merged
 * 
 * Detected file collision(s):
 * 
 *      /usr/lib64/dri/i965_dri.so
 *      /usr/lib64/dri/swrast_dri.so
 * 
 * Searching all installed packages for file collisions...
 * 
 * Press Ctrl-C to Stop
 * 
 * None of the installed packages claim the file(s).
 * 
 * Package 'media-libs/mesa-18.1.0-r1' NOT merged due to file collisions.
 * If necessary, refer to your elog messages for the whole content of the
 * above message.
Comment 1 Coacher 2018-05-27 18:01:20 UTC
Created attachment 533560 [details]
build.log.gz
Comment 2 Coacher 2018-05-27 18:04:32 UTC
$ emerge -pqv mesa
[ebuild     U ] media-libs/mesa-18.1.0-r1 [18.1.0] USE="classic dri3 egl gbm gles2 nptl wayland -bindist -d3d9 -debug -gallium -gles1 -llvm -opencl -openmax -osmesa -pax_kernel -pic (-selinux) -unwind -vaapi -valgrind -vdpau -vulkan -xa -xvmc" ABI_X86="(64) -32 (-x32)" VIDEO_CARDS="i965 (-freedreno) -i915 (-imx) -intel -nouveau -r100 -r200 -r300 -r600 -radeon -radeonsi (-vc4) -virgl (-vivante) -vmware"
[uninstall    ] app-eselect/eselect-mesa-0.0.10-r1
[blocks b     ] app-eselect/eselect-mesa ("app-eselect/eselect-mesa" is blocking media-libs/mesa-18.1.0-r1)
Comment 3 Coacher 2018-05-27 18:07:00 UTC
equery belongs -e /usr/lib64/dri/i965_dri.so
 * Searching for /usr/lib64/dri/i965_dri.so ...
media-libs/mesa-18.1.0 (/usr/lib64/mesa/i965_dri.so)

equery belongs -e /usr/lib64/dri/swrast_dri.so
 * Searching for /usr/lib64/dri/swrast_dri.so ...
media-libs/mesa-18.1.0 (/usr/lib64/mesa/swrast_dri.so)
Comment 4 Matt Turner gentoo-dev 2018-05-27 18:48:20 UTC
Caused by FEATURES=collision-protect.

I'm surprised portage is trying to install mesa before uninstalling eselect-mesa. I was thinking I could add a pkg_postrm() to eselect-mesa to clean up the symlinks it's created, but if it's uninstalled after mesa that won't help. :(
Comment 5 Matt Turner gentoo-dev 2018-05-27 22:11:35 UTC
I've thought through a bunch of ways of handling this:

1) Add to mesa a pkg_preinst() that deletes the symlinks before install:

+pkg_preinst() {
+       if has_version 'app-eselect/eselect-mesa'; then
+               multilib_pkg_preinst() {
+                       find "${ROOT%/}"/usr/$(get_libdir)/dri -type l -delete || die
+               }
+               multilib_foreach_abi multilib_pkg_preinst
+       fi
+}

But collision-protect triggers before pkg_preinst(), so that doesn't help.

2) Make blocker on eselect-mesa in media-libs/mesa a hard blocker so it's uninstalled first, and make eselect-mesa clean up symlinks on uninstall in pkg_postrm(). Would have to do a straight-to-stable eselect-mesa and then it would only trigger after people installed it, since unininstalling packages use the ebuild from the vdb. Would help stable users, but not unstable users.

3) Zac suggested moving the colliding files in Mesa in src_install() to somewhere else so collision-protect doesn't trigger and then move them back in pkg_preinst(). Feels dirty, especially for a weird corner case like this.

I think I'm just going to say wontfix, given Zac's advice to never use collision-protect. Evidently he added protect-owned for exactly this case.