Package: libdbi-ruby1.8
Version: 0.1.1-1
Severity: normal
Tags: patch
$ ruby -e 'require "dbi";puts(DBI.available_drivers())'
$ dpkg --listfiles libdbd-odbc-ruby1.8 | grep ODBC.rb
/usr/lib/ruby/1.8/DBD/ODBC/ODBC.rb
$ dpkg --listfiles libdbi-ruby1.8 | grep dbi.rb
/usr/lib/ruby/1.8/dbi.rb
$ diff -u dbi.rb.orig dbi.rb
--- dbi.rb.orig 2007-11-06 18:06:54.000000000 -0800
+++ dbi.rb 2007-11-06 18:07:24.000000000 -0800
@@ -238,7 +238,7 @@
# 'dbi:driver:' format.
def available_drivers
drivers = []
- path = File.dirname(File.dirname(__FILE__)) + "/" + DBD::DIR
+ path = File.dirname(__FILE__) + "/" + DBD::DIR
Find.find(path){ |f|
if File.file?(f)
driver = File.basename(f, ".rb")
$
Without the patch, the code looks in the dirname of the dirname of
/usr/lib/ruby/1.8/dbi.rb, which is /usr/lib/ruby, for a directory called
"DBD". That directory is one level lower - in the "1.8" sub-directory.
Perhaps libdbd-odbc-ruby1.8 should be installing its driver in
/usr/lib/ruby but that didn't sound likely to me. libdbd-mysql-ruby1.8
behaves like the ODBC driver.
-- System Information:
Debian Release: 4.0
APT prefers stable
APT policy: (500, 'stable'), (50, 'unstable')
Architecture: amd64 (x86_64)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-4-amd64
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored:
LC_ALL set to en_US.UTF-8)
Versions of packages libdbi-ruby1.8 depends on:
ii libruby1.8 1.8.5-4 Libraries necessary to run
Ruby 1.
libdbi-ruby1.8 recommends no packages.
-- no debconf information
--- dbi.rb.orig 2007-11-06 18:06:54.000000000 -0800
+++ dbi.rb 2007-11-06 18:07:24.000000000 -0800
@@ -238,7 +238,7 @@
# 'dbi:driver:' format.
def available_drivers
drivers = []
- path = File.dirname(File.dirname(__FILE__)) + "/" + DBD::DIR
+ path = File.dirname(__FILE__) + "/" + DBD::DIR
Find.find(path){ |f|
if File.file?(f)
driver = File.basename(f, ".rb")