Subject: Re: Symlinking ruby${RUBY_VER} to ruby?
To: Takahiro Kambe <>
From: Julio M. Merino Vidal <>
List: tech-pkg
Date: 10/02/2005 17:51:00
On 10/2/05, Takahiro Kambe <> wrote:
> In message <>
>         on Sun, 2 Oct 2005 17:28:36 +0200,
>         "Julio M. Merino Vidal" <> 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=
> > and then, at a later step, add pkg_alternatives; the new 'ruby' name wi=
> > 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=
> > in pkgsrc, specially targetting users of binary packages.  pkg_alternat=
> > provides complete customization of what these users get.  (Is the exist=
> > '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=
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=
prefer when typing 'ruby'.

Julio M. Merino Vidal <>
The NetBSD Project -