During an "emerge -DNu dev-java/jruby", install revealed a collision betteween multiple files from "dev-ruby/rubygems"
Steps to Reproduce:
1. install dev-ruby/rubygems-1.3.3 (no use flag)
2. try to install dev-java/jruby-1.2.0-r1 (java6 ssl)
dev-java/jruby-1.2.0-r1 not installed
Created attachment 192205 [details]
emerge --info and emerge -DNu dev-java/jruby
ruby: any idea why rubygems would own files under /usr/share/jruby ?
Not unless you hacked ebuild and eclass like I did last night as PoC..
Ah, so /usr/share/jruby/lib/site_ruby used to be a symlink to /usr/lib/ruby in older jruby versions, now replaced by a proper directory with own content. And the collision detect code is not that smart to see it's not a collision... Removing the symlink in pkg_preinst also does not work because the collision check is run before (bug 233278).
I've therefore added checks in pkg_setup which die and give instructions. I guess blocking on older jruby could work too but perhaps less explanatory and more confusing, the benefit being occuring in the dependency resolution phase...?
I managed to install jruby-1.2.0-r1, unmerging jruby-1.0.3 and then installing jruby-1.2.0-r1
does something like "!<jruby-1.2.0-r1" in the dependency of jruby would solve this problem ?
(In reply to comment #5)
> does something like "!<jruby-1.2.0-r1" in the dependency of jruby would solve
> this problem ?
Portage (2.2 at least) seems to ignore such block.
portage: want to draw any bug for collision protect and/or lack of self-blocking?
solving bug 233278 would allow better solution
(In reply to comment #8)
> solving bug 233278 would allow better solution
That's one way to do it. However, portage shouldn't be ignoring this blocker. I plan to fix it so that you can use something like !!<jruby-1.2.0-r1 for this case. The new !!atom syntax seems to make more sense for this case, since !atom means the packages can be temporarily installed simultaneously.
Created attachment 195901 [details, diff]
Make emerge repsect blockers for packages in the same slot, except the selected version itself.
(In reply to comment #10)
> Created an attachment (id=195901) 
> Make emerge repsect blockers for packages in the same slot, except the selected
> version itself.
Thanks, I've committed a similar patch in r13716. The condition I used is:
if pkg.slot_atom == parent.slot_atom and \
I think this should be fine even for the same cpv since the new !!atom syntax is less commonly used.
*** Bug 277430 has been marked as a duplicate of this bug. ***
This is fixed in 2.2_rc34.
*** Bug 287306 has been marked as a duplicate of this bug. ***
This is fixed in 2.1.7.