Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 158844 - [PATCH] gems.eclass dependencies fix
Summary: [PATCH] gems.eclass dependencies fix
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Ruby Team
URL: http://rubyforge.org/tracker/index.ph...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-12-22 09:03 UTC by Jonas Pfenniger
Modified: 2006-12-29 08:57 UTC (History)
0 users

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


Attachments
this is the mentioned patch (gems.eclass.patch,325 bytes, patch)
2006-12-22 09:05 UTC, Jonas Pfenniger
Details | Diff
united diff version (gems.eclass.patch,677 bytes, patch)
2006-12-22 09:08 UTC, Jonas Pfenniger
Details | Diff
United diff with the previous MY_P mentioned issue (gems.eclass.patch,896 bytes, patch)
2006-12-26 02:44 UTC, Jonas Pfenniger
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jonas Pfenniger 2006-12-22 09:03:45 UTC
Rubygems has a bug [1] where the install process can exit with a zero exit status even if the installation went wrong. The following patch adds a test that makes sure that the gem is installed.

The bug is reproductible on 0.8.11-r5 and 0.9.0. I suspect other versions to be affected as well.

I'm pretty new to Gentoo Bugs so I don't know what patch format you're using. The patch that will be attached to that bug was produced with no flags.

Let me know if you need more informations.

Cheers,
  zimbatm

[1] : See the URL of that bug.
Comment 1 Jonas Pfenniger 2006-12-22 09:05:10 UTC
Created attachment 104591 [details, diff]
this is the mentioned patch
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2006-12-22 09:05:14 UTC
(In reply to comment #0)
> I'm pretty new to Gentoo Bugs so I don't know what patch format you're using.

Unified diffs are strongly preferred :)
Comment 3 Jonas Pfenniger 2006-12-22 09:08:16 UTC
Created attachment 104592 [details, diff]
united diff version

too late :)
Comment 4 Nguyen Thai Ngoc Duy (RETIRED) gentoo-dev 2006-12-22 15:27:42 UTC
Um.. are you sure using ${P} in "specifications/${P}.gemspec" is right? This could be ${MY_P} in some cases (dev-ruby/mega-modules for example)
Comment 5 Jonas Pfenniger 2006-12-22 17:37:04 UTC
(In reply to comment #4)
> Um.. are you sure using ${P} in "specifications/${P}.gemspec" is right? This
> could be ${MY_P} in some cases (dev-ruby/mega-modules for example)

No, you're right.

Btw, dev-ruby/mega-modules is a good example of what should not happen. The gem has a "nano" dependency that the ebuild doesn't provide. So at the end you get a successful installation report from portage but no file was installed.

Now that I think of it, checking for the emptiness of the specifications folder should be enough. What do you think ?
Comment 6 Nguyen Thai Ngoc Duy (RETIRED) gentoo-dev 2006-12-22 17:52:00 UTC
(In reply to comment #5)
> Btw, dev-ruby/mega-modules is a good example of what should not happen. The gem
> has a "nano" dependency that the ebuild doesn't provide. So at the end you get
> a successful installation report from portage but no file was installed.

Err.. I don't know :P I just grepped around to find if there is any package whos e package name is not identical to its gem name. I'll check mega-modules later

> 
> Now that I think of it, checking for the emptiness of the specifications folder
> should be enough. What do you think ?

No. My specifications dir already has 24 gemspec files there. If the 25th fails to install it would report successful installation. I think your way is good enough if you check for MY_P as well (like the way GEM_SRC is set up).

The ideal way is have rubygems return proper exit value (I'll investigate into this and maybe open a bug upstream)

Comment 7 Jonas Pfenniger 2006-12-23 04:11:58 UTC
(In reply to comment #6)
> (In reply to comment #5)
> > Now that I think of it, checking for the emptiness of the specifications folder
> > should be enough. What do you think ?
> 
> No. My specifications dir already has 24 gemspec files there. If the 25th fails
> to install it would report successful installation. I think your way is good
> enough if you check for MY_P as well (like the way GEM_SRC is set up).

Yes, well it's checked in the sandbox so the previously installed gems don't matter. But I think the MY_P-P check is more precise.

> The ideal way is have rubygems return proper exit value (I'll investigate into
> this and maybe open a bug upstream)

Done. See : http://rubyforge.org/tracker/index.php?func=detail&aid=7424&group_id=126&atid=575
Comment 8 Jonas Pfenniger 2006-12-26 01:35:06 UTC
http://rubyforge.org/tracker/?group_id=126&atid=575&func=detail&aid=7424 has been fixed and closed. The next rubygems release will behave correctly.

Does this bug still matter ?
Comment 9 Nguyen Thai Ngoc Duy (RETIRED) gentoo-dev 2006-12-26 02:04:52 UTC
(In reply to comment #8)
> http://rubyforge.org/tracker/?group_id=126&atid=575&func=detail&aid=7424 has
> been fixed and closed. The next rubygems release will behave correctly.

Yeah, maybe r1117 have fixed it

> 
> Does this bug still matter ?

As long as gems.eclass uses older rubygems, I think it still matter.
Comment 10 Jonas Pfenniger 2006-12-26 02:44:29 UTC
Created attachment 104733 [details, diff]
United diff with the previous MY_P mentioned issue

I've tested the following cases :
 * Installing an ebuild that uses the gems eclass
 * Installing an ebuild that uses the gems eclass with a broken gem dependency (using MY_P)
Comment 11 Nguyen Thai Ngoc Duy (RETIRED) gentoo-dev 2006-12-29 08:57:28 UTC
It's in. Thanks for your contribution.