Bug 176182 - java-config: add support for optional dependencies to package.env
Bug#: 176182 Product:  Gentoo Linux Version: unspecified Platform: All
OS/Version: Linux Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: java@gentoo.org Reported By: betelgeuse@gentoo.org
Component: Java
URL: 
Summary: java-config: add support for optional dependencies to package.env
Keywords:  
Status Whiteboard: 
Opened: 2007-04-26 22:50 0000
Description:   Opened: 2007-04-26 22:50 0000
Take for example jdbc drivers. The package can use these if they are installed
but there is no point in dependending on all of them. So I propose:
01:48 <@Betelgeuse> put OPTIONAL_DEPEND="" to package.env
01:48 <@Betelgeuse> gjl takes a look if it's installed
01:48 <@Betelgeuse> if it is, puts to cp
01:49 <@Betelgeuse> Should work with any provider type infra

------- Comment #1 From Vlastimil Babka (Caster) 2007-05-24 21:33:33 0000 -------
The only problem I see with it that the package needs to know about all
existing providers and has to be updated if some new are added. Could also
think of some way there the providers would register by putting a file
somewhere, like ant-tasks register themselves.

------- Comment #2 From Petteri Räty 2007-05-24 21:49:44 0000 -------
(In reply to comment #1)
> The only problem I see with it that the package needs to know about all
> existing providers and has to be updated if some new are added. Could also
> think of some way there the providers would register by putting a file
> somewhere, like ant-tasks register themselves.
> 

Combine this with virtuals support and we should be all set.

------- Comment #3 From Vlastimil Babka (Caster) 2007-05-25 11:03:45 0000 -------
(In reply to comment #2)
> Combine this with virtuals support and we should be all set.

Well if virtuals have support for "gimme all packages satisfying a virtual" and
not just one package :)

------- Comment #4 From Vlastimil Babka (Caster) 2007-05-28 19:33:00 0000 -------
In java-config-2.0.33-r1 and eclass - new function
java-pkg_register-optional-dependency