Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 46237 - Bug in ebuild. Hardcoded version number breaks new ruby versions.
Summary: Bug in ebuild. Hardcoded version number breaks new ruby versions.
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Gentoo Ruby Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-30 06:02 UTC by evanm
Modified: 2004-03-31 11:04 UTC (History)
0 users

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 evanm 2004-03-30 06:02:47 UTC
The ebuild writer hardcoded ruby version 1.6 in here, so when you update ruby to 1.8 it breaks.

Reproducible: Always
Steps to Reproduce:
1. emerge ruby version 1.8
2. emerge ruby-dbi
3. ruby -wle'require "dbi"'
Actual Results:  
-e:1:in `require': No such file to load -- dbi (LoadError)
        from -e:1


Expected Results:  
load dbi

Below is a patch for the ebuild. It works for me, but I dont' really know how
the ebuilds should be laid out. You might need to fix it:

--- ruby-dbi-0.0.18.ebuild.old  2004-03-30 05:50:30.296422968 -0800
+++ ruby-dbi-0.0.18.ebuild      2004-03-30 06:02:38.692689904 -0800
@@ -10,8 +10,9 @@
 SLOT="0"
 KEYWORDS="x86"
 IUSE="firebird odbc postgres mysql"
+VERSION=$(ruby -e'print VERSION[/\d+\.\d+/]')
 
-DEPEND="=dev-lang/ruby-1.6*
+DEPEND=">=dev-lang/ruby-1.6*
        mysql? ( >=dev-db/mysql-3.23.49 )
        postgres? ( >=dev-db/postgresql-7.1.3-r4 )
        firebird? ( >=dev-db/firebird-1.0-r1 )
@@ -29,16 +30,16 @@
        ruby setup.rb config \
                --with=${myconf} \
                --bin-dir="${D}/usr/bin" \
-               --rb-dir="${D}/usr/lib/ruby/site_ruby/1.6" \
-               --so-dir="${D}/usr/lib/ruby/site_ruby/1.6/i686-linux-gnu" || die
+               --rb-dir="${D}/usr/lib/ruby/site_ruby/$VERSION" \
+               --so-dir="${D}/usr/lib/ruby/site_ruby/$VERSION/i686-linux-gnu"
|| die
 
        ruby setup.rb setup || die
 }
 
 src_install() {
        dodir /usr/bin
-       dodir /usr/lib/ruby/site_ruby/1.6
-       dodir /usr/lib/ruby/site_ruby/1.6/i686-linux-gnu
+       dodir /usr/lib/ruby/site_ruby/$VERSION
+       dodir /usr/lib/ruby/site_ruby/$VERSION/i686-linux-gnu
 
        ruby setup.rb install || die
Comment 1 Mamoru KOMACHI (RETIRED) gentoo-dev 2004-03-31 11:04:54 UTC
I made a patch and applied it to fix the problem. Thanks for reporting.
(FYI, you shouldn't write >=dev-lang/ruby-1.6* but >=dev-lang/ruby-1.6.
Please see http://www.gentoo.org/doc/en/ebuild-mistakes.xml for more
detail)