Subject: Re: HEADS UP: Alternatives system added
To: Martin S. Weber <Ephaeton@gmx.net>
From: Julio M. Merino Vidal <jmmv@menta.net>
List: tech-pkg
Date: 01/25/2005 16:23:22
On Tue, Jan 25, 2005 at 03:15:54PM +0100, Martin S. Weber wrote:
> On Tue, Jan 25, 2005 at 02:55:12PM +0100, Julio M. Merino Vidal wrote:
> > Hi all,
> > 
> > as we have been discussing during the last days, I've added the alternatives
> > framework to pkgsrc and converted nvi and vim* to use it.
> > 
> > When you decide to update any of these packages, pkg_alternatives should be
> > pulled in as a dependency and, after the installation, you should be able
> > to run the installed package using the common 'vi', 'ex' and 'view' names.
> > 
> 
> Why mandatory ? I am making a difference between vi (/usr/bin/vi) and vim
> (from pkgsrc), and I am actually expecting to have /usr/bin/vi invoked
> when I type "vi" and /usr/pkg/bin/vim invoked when I type vim. I don't
> want these two to be mixed. IMO (yeah I missed the discussion before, it
> seemed to technical for me to contribute) leave the choice to the user
> whether he WANTS to treat some pkg as replacement for another pkg and/or
> for a base binary. Please change this so it isn't forced on me.

You have to choices:

1) Make your path use /usr/bin before /usr/pkg/bin.

2) Adjust the vi wrapper to run /usr/bin/vi:

    pkg_alternatives -w manual /usr/pkg/bin/vi /usr/bin/vi

   after that, no package will modify your setting.

Oh well... I can add a variable that affects the _registering_ of
alternatives at install/deinstall time.  That should be enough for
anyone that doesn't want to use this system at all.

Cheers,

-- 
Julio M. Merino Vidal <jmmv@menta.net>
The NetBSD Project - http://www.NetBSD.org/