Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 22487 - dev-ruby/optparse ebuild hard coded to ruby version 1.6
Summary: dev-ruby/optparse ebuild hard coded to ruby version 1.6
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Tom Payne (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-06-09 07:55 UTC by Martin Stannard
Modified: 2003-09-25 17:53 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Stannard 2003-06-09 07:55:39 UTC
the optparse ebuild contains the following:

src_install () {
	insinto /usr/lib/ruby/site_ruby/1.6
	doins optparse.rb

	insinto /usr/lib/ruby/site_ruby/1.6/optparse
	doins optparse/*

This would seem to hard code it to ruby version 1.6

Reproducible: Always
Steps to Reproduce:
1.
2.
3.




Maybe this could be fixed by running:

RB_DIR=`ruby -e 'require "rbconfig"; puts Config::CONFIG["sitelibdir"]'`

and 

insinto RB_DIR
Comment 1 Mamoru KOMACHI (RETIRED) gentoo-dev 2003-06-09 23:10:50 UTC
ruby-1.8 includes optparse feature by default, 
so it is not necessary to install it on ruby 1.8 and above.

By the way, I suggest that both optparse (under ruby-1.6)
and ruby-1.8 include PROVIDE="virtual/optparse" so that ruby
packages which depend on optparse could use optparse + ruby-1.6
or ruby-1.8 built-in optparse. At this moment, you are 
force to install optparse ebuild regardless of the version
of ruby when you want to install packages depending on optparse ;-(
Comment 2 Tom Payne (RETIRED) gentoo-dev 2003-06-10 04:31:39 UTC
We have the same problem with rexml, racc, yaml, and runit.

I've known about it for a while, but held off fixing it until a newer version of ruby 1.8.0 is release (pre3 is due in a few weeks).

Looks like it's time for me to create some virtuals!
Comment 3 Tom Payne (RETIRED) gentoo-dev 2003-06-10 12:28:51 UTC
Now in CVS -- ~masked and package.masked. Please test it because I can't (I'm using ruby-cvs-1.8.0 and don't want to trash my installation just to test this one package).

to test:
emerge /usr/portage/dev-ruby/optparse/optparse-0.12.ebuild

Report success/failure here and I'll unmask it.

Thanks,
Tom
Comment 4 Mamoru KOMACHI (RETIRED) gentoo-dev 2003-06-10 14:25:12 UTC
optparse-0.12.ebuild will install optparse into /usr/lib/ruby/site_ruby
instead of /usr/lib/ruby/site_ruby/1.6 -- is it desired behaviour?
I think it should be installed to /usr/lib/ruby/site_ruby/1.6
if you use ruby-1.6, and adding the flag
--destdir=`ruby -r rbconfig -e "puts Config::CONFIG['sitelibdir']"`
to ruby install.rb will do the job.

regards,

Mamoru KOMACHI aka usata
Comment 5 Tom Payne (RETIRED) gentoo-dev 2003-06-10 15:14:12 UTC
Thanks for the feedback. The optparse installer seems to want to place the files in /usr/lib/ruby/site_ruby rather than /usr/lib/ruby/site_ruby/1.?. The relevant line from the ebuild is:

ruby install.rb --prefix=${D} --man-install=/usr/share/man --doc-install=/usr/share/doc/$ {PF}

If optparse-0.12 works as-is (i.e. ruby 1.6 finds optparse.rb in /usr/lib/ruby/site_ruby) then let's stick with that (it's the way the package author intended it!). If it doesn't work then I'll change the ebuild.

Thanks,

Tom
Comment 6 Tom Payne (RETIRED) gentoo-dev 2003-09-25 17:53:03 UTC
Resolution lost by bugzilla