Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 435682 - media-libs/glu-9.0.0 fails to emerge due to file collision(s)
Summary: media-libs/glu-9.0.0 fails to emerge due to file collision(s)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
: 436096 (view as bug list)
Depends on:
Blocks: 440872
  Show dependency tree
 
Reported: 2012-09-20 18:45 UTC by Robert Cabrera
Modified: 2016-05-21 12:15 UTC (History)
3 users (show)

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


Attachments
glu-9.0.0-file-collision.patch (glu-9.0.0-file-collision.patch,849 bytes, patch)
2012-11-11 00:41 UTC, Chí-Thanh Christopher Nguyễn
Details | Diff
glu-9.0.0-file-collision.patch v2 (glu-9.0.0-file-collision.patch,851 bytes, text/plain)
2012-11-11 00:44 UTC, Chí-Thanh Christopher Nguyễn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Cabrera 2012-09-20 18:45:43 UTC
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.
Comment 1 Chí-Thanh Christopher Nguyễn gentoo-dev 2012-09-20 19:00:25 UTC
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.
Comment 2 Chí-Thanh Christopher Nguyễn gentoo-dev 2012-09-24 12:30:46 UTC
*** Bug 436096 has been marked as a duplicate of this bug. ***
Comment 3 Arfrever Frehtes Taifersar Arahesis 2012-09-24 17:37:18 UTC
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
}
Comment 4 Chí-Thanh Christopher Nguyễn gentoo-dev 2012-09-24 18:04:03 UTC
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.
Comment 5 Nikoli 2012-09-24 18:23:45 UTC
May be use pkg_preinst()?
Comment 6 Arfrever Frehtes Taifersar Arahesis 2012-09-24 18:55:06 UTC
pkg_preinst() is run after collision check.
Comment 7 Chí-Thanh Christopher Nguyễn gentoo-dev 2012-09-24 19:55:46 UTC
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.
Comment 8 Arfrever Frehtes Taifersar Arahesis 2012-09-24 19:59:05 UTC
(In reply to comment #7)
> libGLU.so is a symlink not owned by any package.

How do you plan to check it?
Comment 9 Chí-Thanh Christopher Nguyễn gentoo-dev 2012-09-24 21:00:43 UTC
with portageq owners
Comment 10 Arfrever Frehtes Taifersar Arahesis 2012-09-24 23:38:19 UTC
(In reply to comment #9)
> with portageq owners

portageq is Portage-specific.
Comment 11 Chí-Thanh Christopher Nguyễn gentoo-dev 2012-09-24 23:45:07 UTC
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.
Comment 12 Chí-Thanh Christopher Nguyễn gentoo-dev 2012-11-11 00:41:15 UTC
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".
Comment 13 Chí-Thanh Christopher Nguyễn gentoo-dev 2012-11-11 00:44:19 UTC
Created attachment 329160 [details]
glu-9.0.0-file-collision.patch v2

use pkg_pretend instead of pkg_setup
Comment 14 Chí-Thanh Christopher Nguyễn gentoo-dev 2012-11-14 13:08:58 UTC
Fixed in CVS.