[clc-devel] alias support in prt-get

Johannes Winkelmann jw at tks6.net
Thu Dec 9 07:07:13 UTC 2004


Hi Victor,

On Thu, Dec 09, 2004 at 00:24:14 -0500, Victor wrote:
> Johannes Winkelmann wrote:
[...]
> >What's currently there is the following:
> >
> ><quote>
> >postfix: sendmail
> >j2sdk: j2re
> ></quote>
> 
> Alright, I guess when you start from end threads, you misunderstand the 
> issue. :)
Hard to say, considering that we've spent quite some time discussion
this at CRUXCon...


> I don't see why it's easier to do this, instead of doing
> 
>    mta: postfix sendmail exim
>    java: j2sdk j2re
> 
> Otherwise, it seems to me, there is a lot of duplication where every 
> port has to note every other port.
There are two disadvantages:
- you have to define those virtual dependencies, probably in a central
  place
- which one's the default? The first one?

Both are addressed in the aliases thing. I'm sorry I didn't include the
discussion why we chose the aliases solution over complete virtual
dependencies, but as you see, it's not only easier but also simpler and
less prone to errors. 
If you'd like to create a port which is an alias to sendmail, and MTA
would not be a virtual dependency yet, what you'd have to do is:

1. Ask someone(tm) to add the virtual dependency in the dependency list
2. Add a "provides: mta" field to sendmail
3. change every port depending on sendmail to depend on MTA
4. make sure every packager knows that he/she should use MTA now
5. Add "depends: mta" to your new Pkgfile

For our alias solution, it about that:
1. Add "alias: sendmail" to your new Pkgfile


Even if the virtual dependencies might seem a bit cleaner, the
complexity they bring along a lot bigger than any advantage. IMHO, of
course.

> In the listed approach, any time a new port that is an mta is added,
> existing ports must be modified, which is not a good approach in my
> opinion. Having "generalized" keys is easier and "better". However,
> now the port system would have to store that metadata somewhere.
> Perhaps a good approach for storing port metadata is what we really
> need, instead of workarounds that don't address the problem properly.
Yes, there will be one, but this will be the next generation pkgutils.
Given that it's a major change there, this won't be ready for the next
release of CRUX. prt-get's aliases workaround will go away then, but
since that the problem exists now, and that it mostly affects prt-get's
dependency command, it's also addressed there.

Kind regards, 
Johannes
-- 
Johannes Winkelmann              mailto:jw at tks6.net
Bern, Switzerland                http://jw.tks6.net



More information about the crux-devel mailing list