On 12/10/2013 10:19 AM, Grant Edwards wrote:
> 
> I understand that portage defaults to installing multiple versions (of
> Ruby, Python, and probably other stuff).  What I don't understand it
> _why_.  If none of the ebuilds specify q version, then they
> presumably will work with any availble version -- so why not just
> install one version?
> 

Most packages will work with more than one version of Ruby. The package
itself behaves the same, so you don't want to create three slots -- one
for each of ruby-1.8, ruby-1.9, and ruby-2.0 -- since they all do the
same thing. And you'd have to do that for every Ruby package in the tree.

The alternative is to install the package for whichever interpreter(s)
will work, subject to the user's RUBY_TARGETS. If I install
dev-ruby/libfoo and I have RUBY_TARGETS="ruby19 ruby20", then I should
be able to use libfoo in both my ruby19 programs and my ruby20 programs.

So why is the RUBY_TARGETS default the way it is? I can't speak for the
Ruby team, but it was most likely chosen as the upgrade path that causes
the least pain. It's not perfect, as you've seen, but different parts of
the Ruby ecosystem move at a different pace, and you have to make them
all place nice.

During a transition period like this, various upstreams release a bunch
of crap with circular or conflicting dependencies that happen to work on
their machines because nobody is using a real package manager. The fact
that it works as well as it does is a miracle. If you don't want all
three versions of Ruby on your machine, try setting e.g.
RUBY_TARGETS="ruby19". It probably won't work, but that's because some
package has troublesome dependencies, not because we're handling it wrong.


Reply via email to