Subject: Re: Symlinking ruby${RUBY_VER} to ruby?
To: Takahiro Kambe <taca@back-street.net>
From: Julio M. Merino Vidal <jmmv84@gmail.com>
List: tech-pkg
Date: 10/02/2005 17:51:00
On 10/2/05, Takahiro Kambe <taca@back-street.net> wrote:
> In message <6b2d1e190510020828y12859cf9ub2fe73c5a3ce32f7@mail.gmail.com>
>         on Sun, 2 Oct 2005 17:28:36 +0200,
>         "Julio M. Merino Vidal" <jmmv84@gmail.com> wrote:
> > > pkg_alternatives is optional tool.
> >
> > Yes, it is, based on the request of many users.  However, the framework
> > is not optional.  What I mean is that you can first install the ruby pa=
ckages
> > and then, at a later step, add pkg_alternatives; the new 'ruby' name wi=
ll
> > pop up automagically.
> I see.  (But I must think consistency for current lang/ruby package
> which gives commands without ${RUBY_VER} suffix.)

That's what alternatives aims for, too (see below).

> > > So, I understand it as "another way." and there should be other way
> > > (as symlink ${PREFIX}/bin/ruby18 as ${WRKDIR}/.buildlink/bin/ruby or
> > > somthing?)
> >
> > It is certainly another way, but it was added to homogenize all this st=
uff
> > in pkgsrc, specially targetting users of binary packages.  pkg_alternat=
ives
> > provides complete customization of what these users get.  (Is the exist=
ing
> > 'ruby' package binary friendly?  Or it relies on a specific version giv=
en at
> > build time?)
> Do you mean lang/ruby package?  Yes it depends on specific to
> ruby${RUBY_VER}; it creates binary package ruby-${RUBY_VER}nb2.tgz and
> user can select to install either of ruby-1.8.2nb2.tgz or
> ruby-1.6.8nb2 package.

Aha.  But how do you get that to work with a bulk build?  Won't it build ju=
st
a single pakcage?

With alternatives, there could be no ruby-1.6* nor ruby-1.8* package.
The administrator could install ruby16 and/or ruby18 and then use
pkg_alternatives to select which of the two has to be run when somebody
executes /usr/pkg/bin/ruby.

Even more, each user is allowed to customize this behavior without
affecting the rest of the users, running the version of the interpreter the=
y
prefer when typing 'ruby'.

--
Julio M. Merino Vidal <jmmv84@gmail.com>
http://www.livejournal.com/users/jmmv/
The NetBSD Project - http://www.NetBSD.org/