installing a package that wants the "wrong" java
diesch at spamfence.net
Tue Jun 29 19:50:27 UTC 2010
"Robert P. J. Day" <rpjday at crashcourse.ca> writes:
> On Mon, 28 Jun 2010, Florian Diesch wrote:
>> "Robert P. J. Day" <rpjday at crashcourse.ca> writes:
> ... snip ...
>> > also, if that software really is compatible with openjdk, would
>> > it make more sense for the vendor to list as its dependency the
>> > more generic "java-compiler" or "java6-sdk" so that either one
>> > would satisfy the dependency? thanks.
>> I think so. But you better ask at the developer mailing list what's
>> the current best practise. Maybe someone could update
> here's a more specific question -- is there a way to package
> software such that it depends on the meta(?)package java6-sdk, but it
> "prefers" sun's java as opposed to openjdk?
If you use "sun-java6-sdk | java6-sdk" as dependency the package manager
will accept any package providing java6-sdk and install sun-java6-sdk if
no package providing java6-sdk is already installed
> my attitude is, i'm fine with openjdk not being *officially*
> supported, i just want the *option* of it satisfying the dependency.
> is there a way that this sort of thing is done in packaging? maybe an
> installation dialog of the form, "i officially support sun's java, but
> i see you have openjdk installed -- are you sure you want to do this?"
You could check with update-java-alternatives what's the currently
active Java package and use debconf to display a warning, see the
How to add files opened in Emacs to GNOME’s recently used document list:
More information about the ubuntu-users