Subject: Re: HEADS UP: Alternatives system added
To: Julio M. Merino Vidal <>
From: Pavel Cahyna <>
List: tech-pkg
Date: 01/25/2005 21:42:17
On Tue, 25 Jan 2005 14:55:12 +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.
> Here are some commands to play with, assuming you have both vim and nvi
> installed:
>     pkg_alternatives list       # List all available packages with alternatives
>     pkg_alternatives status nvi # Show status of all wrappers associated to nvi
>     pkg_alternatives manual nvi # Select nvi as a default

Shouldn't there be also

pkg_alternatives list vi    # List all available packages which provide vi
pkg_alternatives display vi # show status of the vi wrapper
pkg_alternatives manual vi nvi # Select nvi as a default for vi

Why is the latter needed? Suppose that openssh is an alternative for 1/
ssh (the other alternative being ssh2) and 2/ rsh (the other alternative
being e.g. heimdal). One then would want to handle those cases separately.
E.g. select openssh as default for ssh, but heimdal for rsh. Etc.

(maybe the syntax is not ideal, but you got the idea.)

Bye	Pavel