[clc-devel] alias support in prt-get

Johannes Winkelmann jw at tks6.net
Mon Dec 6 22:38:16 UTC 2004


Hi,

I've just uploaded a test version of prt-get (0.5.9-test2) to my
personal httpup repo [1] which has support for "aliases", a concept we
discussed at CRUXCon; the idea is that a package can have a number of
aliases, which can be used to do dependency resolving. The most typical
example is probably sendmail and its replacements; in this case, we'd
alias all the other MTA's as being sendmail. It's sortof what other
package management systems have with "virtual dependencies" or
"provides", just adapted. The idea is not to look for generic terms for
something and alias all others (think: 'windowmanager', 'browser' etc.)
but for dependencies which can be provided by others. 
A second example is Java, where the Software Development Kit (SDK)
provides a Java Runtime Environment (JRE) too.

In the future, this infomation should live in the ports itself and be
transferred to the package database, but until this is ready, prt-get
reads /var/lib/pkg/aliases and gets its information there from. This
file is currently really sparse, which is the main reason for this
e-mail: I'd like to hear suggestions for possible aliases to include;
please send it to the list so we can have a little discussion if needed.
What's currently there is the following:

<quote>
postfix: sendmail
j2sdk: j2re
</quote>

This is also the first step to resolve the issues we have with Java
right now; stay tuned for more :-).


A few examples from prt-get:

$ prt-get depends firefox-java-plugin 
-- dependencies ([i] = installed)
[i] j2re (provided by j2sdk)
[...]
[i] firefox
[i] firefox-java-plugin
$ prt-get isinst j2re 
j2re is provided by package j2sdk
$


A possible downside is that there's no way to force prt-get to install
j2re if you have j2sdk installed. IMO this is even better this way, but
it might not always be wanted; I'm thinking about a --noalias switch to
disable alias considerations completely, but I want to give that some
thought (and probably wait until someone really wants this).

So, as mentioned before, I'd like to hear additions to my "aliases"
list.
Kind regards, Johannes


References:
 1. http://jw.tks6.net/files/crux/ports#prt-get
-- 
Johannes Winkelmann              mailto:jw at tks6.net
Bern, Switzerland                http://jw.tks6.net



More information about the crux-devel mailing list