Subject: Re: providing a feature/capability instead of specific package
To: Julio M. Merino Vidal <jmmv@menta.net>
From: Hubert Feyrer <hubert@feyrer.de>
List: tech-pkg
Date: 10/14/2004 20:48:40
On Thu, 14 Oct 2004, Julio M. Merino Vidal wrote:
>> 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.

Yes. And before that, it might be good to _design_ it. :-)


> 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/virtualpkgs.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.

Of course it is, but raping our current dependency system to do it seems 
wrong to me. You could as well just make a meta-pkg that depends on one of 
several MTAs, depend on the meta pkg, and call it good.

Doing this right needs a lot more - I recommend reading the RPM book for 
some of the basics.

To add my personal opinion (after my questions still aren't answered):
I think our dependency system is good the way it is, depending on pkg 
name/version directly instead of requiring some mapping between 
provides/requires keywords as RPM does. The mapping has raised ways too 
many problems in enough package systems that we should learn from it, not
repeat the same mistakes.

Example?

Did you ever encounter a Linux cluebie that was really surprised why 
NetBSD handled dependencies properly, while his SuSE/RedHat didn't? That's 
because we need not smart programs to resolve dependencies (which rpm(1) 
can't!), and we don't need any "Package Manager" type software (which we 
still don't have after years[1], even for our fine dependency system to 
help adding binary pkgs from e.g. sysinst).


  - Hubert

[1] sushi's just unusable IMHO

-- 
                         ,,__
If wishes were wings,  o"   )~  would fly.            -- Go www.NetBSD.org!
                         ''''