← Back to team overview

openjdk team mailing list archive

[Bug 1584118] Re: 16.04 incorrectly installs openjdk-9 to satisfy java8-runtime dependency

 

Jonas, thank you for your contribution.

> I am not involved with Puppet. I just linked to them
> as an example. But your suggestion doesn't work since

Actually, it does work just fine and will install OpenJDK 8 *if* the user has not installed OpenJDK 9 before (otherwise OpenJDK 9 will satisfy the java8|9-runtime dependencies). In order to guarantee that OpenJDK 8 is installed, it's better to drop javaX-runtime references altogether and instead use:
Depends: default-jre-headless | openjdk-7-jre-headless | openjdk-8-jre-headless

> the problem is that Java9 is the default java8-runtime
> which is installed if you don't have java installed
> already.

That is because both OpenJDK 8 and OpenJDK 9 packages provide the
java8-runtime, but as openjdk-9-jre has a higher version it is the
"preferred" install.

Since dpkg 1.17.11 [1] a virtual package in "Provides:" can be
versioned, allowing a "Depends:" on a virtual package to also be
versioned. I will investigate if and when we can start versioning the
virtual packages of both OpenJDK 8 and 9. Please read the comment #33 in
[1] to understand how that works.

> We went a different route to work around this:
> https://github.com/neo4j/neo4j/commit/874c8da6bcb7b227b7451c06e4678924abc93800

The issue I see is that a "Conflicts: java9-runtime-headless,
java9-runtime" entry will force the user to select either that package
(in this example, neo4j) OR OpenJDK 9.

Using such clause is also the wrong approach regarding Debian's policy [2]: 
"Neither Breaks nor Conflicts should be used unless two packages cannot be installed at the same time or installing them both causes one of them to be broken or unusable. Having similar functionality or performing the same tasks as another package is not sufficient reason to declare Breaks or Conflicts with that package."

ie. having OpenJDK 9 installed does *not* cause neo4j to be broken as it
is possible to have another OpenJDK version installed at the same time
and use that to run neo4j.


[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=7330#38
[2] https://www.debian.org/doc/debian-policy/ch-relationships.html#s-conflicts


** Bug watch added: Debian Bug tracker #7330
   http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=7330

-- 
You received this bug notification because you are a member of OpenJDK,
which is subscribed to openjdk-9 in Ubuntu.
https://bugs.launchpad.net/bugs/1584118

Title:
  16.04 incorrectly installs openjdk-9 to satisfy java8-runtime
  dependency

Status in openjdk-9 package in Ubuntu:
  Incomplete

Bug description:
  Hi,
  A user recently reported an issue on our bug tracker stating that our package was pulling in openjdk-9 and subsequently crashed when started. This apparently because openjdk-9 is the default choice for java8-runtime, which is quite surprising.

  Now it is technically correct that java9 does provide a java8-runtime,
  but java9 isn't even released yet and should definitely not be the
  default java8-runtime until that time.

  Same bug was reported against puppet here:
  https://tickets.puppetlabs.com/browse/EZ-77

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openjdk-9/+bug/1584118/+subscriptions


References