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

Filename Description Type Creator Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 46237 depends on: Show dependency tree
Bug 46237 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: 2004-03-30 06:02 0000
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 From Mamoru KOMACHI (RETIRED) 2004-03-31 11:04:54 0000 -------
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)

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