Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 156972
Alias:
Product:
Component:
Status: NEW
Resolution:
Assigned To: Gentoo Ruby Team <ruby@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Hans de Graaff <graaff@gentoo.org>
Add CC:
CC:
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
ruby-setup.tar.gz setup.rb collection application/octet-stream Nguyen Thai Ngoc Duy (RETIRED) 2006-12-08 10:53 0000 79.24 KB Details
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 156972 depends on: Show dependency tree
Bug 156972 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.








View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2006-12-03 02:34 0000
While writing an ebuild for RMagick 1.14.1 I encountered the problem that the
ebuild would try to write the installation files directly into the live
filesystem instead of into the image directory, see #155646 for details. 

The problem is that the setup.rb file distributed with RMagick 1.14.1 does not
look at the config data when installing. Giving it an explicit --prefix during
the  installation step solves this, and that is what I've done in the ebuild
for RMagick. 

However, as kernelsensei mentions in that bug, this could well affect more ruby
packages and may indicate that the bug is actually in ruby.eclass. Since I'm
not very familiar yet with ruby packaging I'd rather open this bug about it
rather than mucking about with the eclass.

Questions to look in to:
- Do we have any other ruby packages that use setup.rb? If so, do they also
create access violations?
- Is the setup.rb in RMagick generic (which means we should adapt the eclass),
or custom?
- Would it hurt other packages if we would give the --prefix option to setup.rb
in the eclass always, to cover both cases.

------- Comment #1 From Boris Fersing 2006-12-03 11:39:46 0000 -------
Hi,

I contacted the Rmagick main dev and he said that the setup.rb is generic :
http://i.loveruby.net/en/projects/setup/

------- Comment #2 From Caleb Tennis 2006-12-04 11:22:06 0000 -------
Hmm, I didn't write the ruby eclass so I can't answer whether --prefix would
cause an issue or not.  But, perhaps we can try it and see what happens!

------- Comment #3 From Hans de Graaff 2006-12-04 12:30:10 0000 -------
My main concern is that we'd break existing packages using setup.rb. However,
given that RMagick uses a standard setup.rb and that we install most packages
as a gem that chance may not be very large. 

------- Comment #4 From Nguyen Thai Ngoc Duy (RETIRED) 2006-12-08 10:53:22 0000 -------
Created an attachment (id=103639) [details]
setup.rb collection

I did a quick grep over dev-ruby to find non-gem packages, fetched them all and
extract setup.rb. There are only 12 packages that have setup.rb. There are some
very different setup.rb implementations. I think racc's setup.rb is more
standard than RMagick's according to diff.
Anyway 12 is not a big deal, just test them all :)

------- Comment #5 From Nguyen Thai Ngoc Duy (RETIRED) 2006-12-16 16:53:35 0000 -------
I'm not really sure whether this is a good move. fusefs-0.6.0 fails to install
if I append either --prefix=${D} or --prefix=${D}/usr

BTW Hans, may I know why you use --prefix=${D} instead of --prefix=${D}/usr in
rmagick ebuild?

------- Comment #6 From Hans de Graaff 2006-12-17 02:27:15 0000 -------
I used --prefix=${D} because it worked. :-) I initially tried to use
--prefix=${D}/usr but the package ended up in /usr/usr/bin etc. After
investigating a bit more I've found the following:

'setup.rb install --prefix' determines the directory where the actual files are
written, but respecting the --prefix given in the config step. So for Gentoo
the install --prefix must be ${D}. Normally this would be / which is the
default.

The 'setup.rb config --prefix' step seem to be redundant then, because it
defaults to /usr. Leaving out would work fine, because all files would assume
to be under /usr due to the default --prefix, and then written to ${D} due to
the install --prefix. But...

...the post-install.rb script doesn't care at all about the install --prefix
and only checks the config --prefix. So we need to do both to get everything to
end up in the right place.

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug