[Rubygems-developers] --destdir changed behavior again ?

Luis Lavena luislavena at gmail.com
Sat Nov 15 06:36:09 EST 2008


On Fri, Nov 14, 2008 at 8:55 PM, Jeremy Hinegardner
<jeremy at hinegardner.org> wrote:
> Hi all,
>
> I was packaging up rubygems 1.3.1 fo use at my work and it appears that the
> setup.rb behavior has changed since 1.2.0.
>
> in 1.2.0:
>
>  ./setup.rb --destdir=/fakeroot/location
>
> Items get installed into:
>
>  /fakeroot/location/usr/bin
>  /fakeroot/location/usr/lib
>
> in 1.3.1 ( and 1.3.0 )
>
>  ./setup.rb --destdir=/fakeroot/location
>
> Items get installed into:
>
>  /fakeroot/location/bin
>  /fakeroot/location/lib
>
> Is the purpose now, if you want to use destdir, that you are required to
> also use --prefix?   I don't know about others, but for me, --destdir
> means setting where '/' is supposed to be, and then rubygems should
> install relative to that as normal.
>
> The bug for me is all in :
>
>  unless install_destdir.empty?
>    top_dir = Pathname.new(RbConfig::TOPDIR)
>    lib_dir_p = Pathname.new(lib_dir)
>    bin_dir_p = Pathname.new(bin_dir)
>
>    lib_dir = File.join install_destdir, lib_dir_p.relative_path_from(top_dir)
>    bin_dir = File.join install_destdir, bin_dir_p.relative_path_from(top_dir)
>  end
>
> I'm thinking it should really be:
>
>    top_dir = Pathname.new(RbConfig::TOPDIR).parent
>
> thoughts?
>

The change was introduced due a previous bug and the imposibility to
rely on Pathname to resolve Windows paths.

Bundlign RubyGems with One-Click Installer generated issues, since by
default it tried to perform all the destdir operations, even when you
didn't used the parameter.

Back in July I introduced the change and asked more about this issue,
since was making my life really hard to update since it's
introduction.

In any case, I was not pleased to break others implementations or
process by this, but the feedback I got was somehow late in relation
to my patch and the release process of RubyGems, so it became
"official" at that time.

The references about this topic:

Request for comments:
http://rubyforge.org/pipermail/rubygems-developers/2008-July/003969.html

Replies:
http://rubyforge.org/pipermail/rubygems-developers/2008-August/004026.html

We use also destdir to package RubyGems separated from Ruby, but it
was generating a complex folder structure (and errors due driver
letters).

Anyhow, properly fix that benefit both of us will be really great. I
tried to avoid any platform validations since thos are tend to be
forgotten...

Regards,
-- 
Luis Lavena
AREA 17
-
Human beings, who are almost unique in having the ability to learn from
the experience of others, are also remarkable for their apparent
disinclination to do so.
Douglas Adams


More information about the Rubygems-developers mailing list