Subject: Re: pkg_alternatives as a dependency, again
To: Bernd Ernesti <netbsd@lists.veego.de>
From: Todd Vierling <tv@duh.org>
List: tech-pkg
Date: 02/10/2005 15:02:34
On Thu, 10 Feb 2005, Bernd Ernesti wrote:

> And for you example:
>   only pico is installed then nana will be installed afterwards.
>   now, pico will point to nana, right?

No, it will point to pico.  But I see one point here, which I will address:

> I could construct the same thing for elm and mutt, where one would
> really like to use elm even if mutt is also installed and elm is an
> pkg_alternative.

What you're alluding to here is a notion of a primary "default" candidate,
which is currently not in pkg_alternatives.  Currently it just puts the
candidates in arbitrary order.  (Order of installation, or simply sorted by
pathname on a "rebuild".)

It should be possible to add more logic to pkg_alternatives to provide such
a "default" for this situation, which would take effect automatically -- if
the wrapper in question is still in "auto" mode.

So if nano is installed first, bin/pico points to it.  Then, as long as
bin/pico is left in "auto" mode, installing editors/pico later will re-point
the alternative to uwpico.

Would this help?

> Mailed to the list, because you use combined.njabl.org.

I've contacted you offlist about this; it's not related to njabl.

-- 
-- Todd Vierling <tv@duh.org> <tv@pobox.com>