Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 270953 - [PATCH] !!atom blockers do not work for packages in the same slot
Summary: [PATCH] !!atom blockers do not work for packages in the same slot
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
: 277430 287306 (view as bug list)
Depends on:
Blocks: 155723 210077 288499 326179
  Show dependency tree
 
Reported: 2009-05-23 15:10 UTC by Wilfried
Modified: 2010-07-01 11:04 UTC (History)
7 users (show)

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


Attachments
emerge --info and emerge -DNu dev-java/jruby (attachment,22.31 KB, text/plain)
2009-05-23 15:13 UTC, Wilfried
Details
Make emerge repsect blockers for packages in the same slot, except the selected version itself. (portage-emerge-respect-blocks-in-the-same-slot.patch,969 bytes, patch)
2009-06-27 17:48 UTC, Sebastian Luther (few)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Wilfried 2009-05-23 15:10:18 UTC
During an "emerge -DNu dev-java/jruby", install revealed a collision betteween multiple files from "dev-ruby/rubygems"

Reproducible: Always

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)
3.

Actual Results:  
dev-ruby/rubygems-1.3.3 installed
dev-java/jruby-1.2.0-r1 not installed

Expected Results:  
dev-ruby/rubygems-1.3.3 installed
dev-java/jruby-1.2.0-r1 installed
Comment 1 Wilfried 2009-05-23 15:13:55 UTC
Created attachment 192205 [details]
emerge --info and emerge -DNu dev-java/jruby
Comment 2 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2009-05-23 21:01:27 UTC
ruby: any idea why rubygems would own files under /usr/share/jruby ?
Comment 3 Diego Elio Pettenò (RETIRED) gentoo-dev 2009-05-23 21:09:41 UTC
Not unless you hacked ebuild and eclass like I did last night as PoC..
Comment 4 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2009-05-23 23:08:04 UTC
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...?
Comment 5 Wilfried 2009-05-24 08:53:34 UTC
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 ?
Comment 6 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2009-05-25 12:04:10 UTC
(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.
Comment 7 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2009-05-25 21:30:02 UTC
portage: want to draw any bug for collision protect and/or lack of self-blocking?
Comment 8 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2009-05-25 21:39:16 UTC
solving bug 233278 would allow better solution
Comment 9 Zac Medico gentoo-dev 2009-05-25 23:38:57 UTC
(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.
Comment 10 Sebastian Luther (few) 2009-06-27 17:48:51 UTC
Created attachment 195901 [details, diff]
Make emerge repsect blockers for packages in the same slot, except the selected version itself.
Comment 11 Zac Medico gentoo-dev 2009-06-27 19:44:00 UTC
(In reply to comment #10)
> Created an attachment (id=195901) [edit]
> 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 \
     not blocker.atom.blocker.overlap.forbid:

I think this should be fine even for the same cpv since the new !!atom syntax is less commonly used.
Comment 12 Samuli Suominen (RETIRED) gentoo-dev 2009-07-12 22:52:09 UTC
*** Bug 277430 has been marked as a duplicate of this bug. ***
Comment 13 Zac Medico gentoo-dev 2009-08-03 23:03:20 UTC
This is fixed in 2.2_rc34.
Comment 14 Justin Lecher (RETIRED) gentoo-dev 2009-10-02 12:25:48 UTC
*** Bug 287306 has been marked as a duplicate of this bug. ***
Comment 15 Zac Medico gentoo-dev 2009-10-11 00:47:48 UTC
This is fixed in 2.1.7.