Danek Duvall wrote:
>
> On Tue, Mar 18, 2008 at 10:43:12PM -0700, Jyri Virkki wrote:
> 
> > Are there plans to support functional dependencies, so for example a
> > package can declare it needs "a database", and both MySQL and postgres
> > packages can fulfill that dependency?
> 
> We've talked about this a handful of times, and have always run into a
> bunch of semantic fuzziness.  For instance, if a package needs "a database"
> and doesn't care which one (i.e., doesn't link against a database's
> libraries), then that dependency might even be satisfied by a database
> installed on another machine, listening on a port that your machine can
> talk to.

Yes, db isn't the best example since it might be remote.. 

A better case is the MTA. I debian exim (IIRC) is the default MTA
which I replace with sendmail but all components which require a
generic "mail-transport-agent" remain happy.

% apt-cache show mutt
[...]
Depends: libc6 (>= 2.3.6-6), libdb4.4, libgnutls13 (>= 1.4.0-0), libidn11 (>= 
0.5.18), libncursesw5 (>= 5.4-5), libsasl2-2, exim4 | mail-transport-agent
                                                     

> Even if the requirement is for a local package, how would you communicate
> this dependency to the user?  Do you pause the installation and ask the
> user to select from a list of packages that would satisfy the dependency?

There should probably be a default answer (such as exim for debian).
For 'database' for example, maybe the default is MySQL so that's what
gets installed if none other is yet available.


Shawn Walker wrote:
>
> In my experience, a program often really needs postgres, MySQL, or
> Oracle specifically.

Well, having functional dependencies doesn't force them to be used
inappropriately!

If package foo depends specifically on Oracle, its dependency must
call that out. You'd only declare a general "database" dependency for
packages which work ok with any of them.

-- 
Jyri J. Virkki - [EMAIL PROTECTED] - Sun Microsystems
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to