Subject: Re: providing a feature/capability instead of specific package
To: Hubert Feyrer <>
From: Julio M. Merino Vidal <>
List: tech-pkg
Date: 10/14/2004 20:29:51
On Thu, 14 Oct 2004 19:36:53 +0200 (CEST)
Hubert Feyrer <> wrote:

> On Thu, 14 Oct 2004, Julio M. Merino Vidal wrote:
> > I think that what RPM or Debian packages do is to pick up a default package
> > for each feature (at least Debian picked up exim for 'mta', IIRC).  This way,
> > if the feature is not installed, a package is picked up automatically;
> > otherwise, the one installed in the machine will be used.
> This does not answer my question.


> Right now, a mapping from dependency to a filename to download/install is 
> easy. How do you propose to map 'mta' to 'exim'?

It depends on how we implement this.  It could simply be hardcoded in the
packages 'we depend on mta; if it's not available we install exim'.  Maybe ugly
because different packages could have different defaults (not that matters much,
since they'd be requiring the same service).

Or we could have a "table" somewhere (i.e., pkgsrc/mk/ or whatever
we call them) that says 'mta defaults to mail/exim>=version.x.y.z with binary
package 'exim').  This table could be later hardcoded in pkgs (and used
appropiately with help of pkg_install), or used to generate regular dependencies
such as {mta,exim}-[0-9]*.  Anyway, it looks like we'll have to do changes in
pkg_install to support this properly.  But it's difficult to imagine without
actually thinking in how we might implement it.

Maybe it is not that easy, but is certainly doable.

> What if sendmail is installed?

It is used, given that it provides the feature being requested (and the default
is ommited).


Julio M. Merino Vidal <>
The NetBSD Project -