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 Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1584118 Title: 16.04 incorrectly installs openjdk-9 to satisfy java8-runtime dependency To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/openjdk-9/+bug/1584118/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
