[Rubygems-developers] r1841 --destdir behaviour

Richard Brown rbrown at exherbo.org
Fri Aug 22 08:01:43 EDT 2008

On Tue, Aug 19, 2008 at 23:42, Luis Lavena <luislavena at gmail.com> wrote:
> On Mon, Aug 18, 2008 at 10:21 PM, Richard Brown <rbrown at exherbo.org> wrote:
>> Hi, I wrote the initial patch for --destdir support, and I have a
>> couple of issues with r1841, I did email Luis and say I would have a
>> look at the end of last month, but I've been a little tied up, sorry.
> Glad to have you back :-D

Thank you.

Someone else has already covered destdir for me, in a way that makes
more sense that what I had typed.

> And this my rbconfig TOPDIR definition:
>  TOPDIR = File.dirname(__FILE__).chomp!("/lib/ruby/1.8/i386-mingw32")

That line is generated from mkconfig.rb when compiling ruby:

prefix = '/lib/ruby/' + RUBY_VERSION.sub(/\.\d+$/, '') + '/' + RUBY_PLATFORM
print "  TOPDIR = File.dirname(__FILE__).chomp!(#{prefix.dump})\n"

Until recently ruby's autofoo used to be hardcoded to use lib, it's
now possbile to specify a --libdir and install somewhere else, e.g.
lib64. Doing that breaks the above bit of code.

CONFIG["prefix"] = (TOPDIR || DESTDIR + "/usr")

Because TOPDIR= uses chomp! when it doens't work it returns nil, so
CONFIG['prefix'] will evaluate to DESTDIR + whatever was passed to
configure in --prefix. DESTIDIR in rbconfig will be '' unless it's
defined before requring rbconfig.

Hope this helps.

If you didn't already say, what's the problem with the installation on
windows that needs solving?


Richard Brown

More information about the Rubygems-developers mailing list