media-libs/glu-9.0.0 is now failing to emerge do to file collisions. Over the course of the past day I've had several issues in trying to emerge this package as I was affected by the other bugs (since resolved) that were discovered when this entered the tree. Now the package is compiling for me, but fails to install because of a collision with "/usr/lib64/libGLU.so" The exact portage output is as follows: * Messages for package media-libs/glu-9.0.0: * 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 http://bugs.gentoo.org unless you report exactly which * two packages install the same file(s). Once again, please do NOT file * a bug report unless you have completely understood the above message. * * package media-libs/glu-9.0.0 NOT merged * * Detected file collision(s): * * /usr/lib64/libGLU.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/glu-9.0.0' NOT merged due to file collisions. If * necessary, refer to your elog messages for the whole content of the * above message. Reproducible: Always Steps to Reproduce: 1. emerge -1 glu 2. 3. Actual Results: Emerge dies with message posted above Expected Results: Successful emerge of glu. Since the emerge output shows no other package claims /usr/lib64/libGLU.so, I was able to work around and install glu by commenting out "collision-protect" in my /etc/make.conf After successfully installing glu I changed back my /etc/make.conf and the rest of the packages in my update cue emerged successfully.
For previous versions of mesa, /usr/lib64/libGLU.so is a symlink managed by eselect opengl, and there is currently no other way around this. Revert to the default FEATURES (protect-owned) to avoid this issue.
*** Bug 436096 has been marked as a duplicate of this bug. ***
media-libs/glu could contain the following workaround: pkg_setup() { if ! has_version ${CATEGORY}/${PN}; then rm -f "${EROOT}usr/$(get_libdir)/libGLU.so"* fi }
Arfrever suggested on IRC to remove the symlinks from eselect opengl in pkg_setup(): pkg_setup() { if has collision-protect ${FEATURES} && ! use multilib && ! has_version ${CATEGORY}/${PN}; then ... However I am not so keen on adding a FEATURES check in the ebuild, also there is the chance that the glu build fails and the user will be left with a broken system. The multilib case where it is likely to fail is already covered here, though.
May be use pkg_preinst()?
pkg_preinst() is run after collision check.
axs suggested on IRC to have pkg_pretend() die if collision-protect is enabled and libGLU.so is a symlink not owned by any package. I think this is strictly better than the current situation, and querying FEATURES in pkg_pretend() like that is not as bad.
(In reply to comment #7) > libGLU.so is a symlink not owned by any package. How do you plan to check it?
with portageq owners
(In reply to comment #9) > with portageq owners portageq is Portage-specific.
Existence of portageq command will of course be checked first. And portageq will still work fine if you use pkgcore. I think paludis has portageq emulation to but I am not fully sure to which extent.
Created attachment 329158 [details, diff] glu-9.0.0-file-collision.patch Proposed patch. Instead of using portageq, it exploits the fact that symlinks managed by eselect opengl contain "opengl".
Created attachment 329160 [details] glu-9.0.0-file-collision.patch v2 use pkg_pretend instead of pkg_setup
Fixed in CVS.