Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 556424 - app-emulation/virtualbox: improve java dependencies for allowing java 1.8
Summary: app-emulation/virtualbox: improve java dependencies for allowing java 1.8
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Lars Wendler (Polynomial-C) (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-31 23:47 UTC by BobbyK
Modified: 2015-08-16 13:53 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description BobbyK 2015-07-31 23:47:43 UTC
Current ebuilds of app-emulation/virtualbox have:

java? ( || ( virtual/jre:1.7 virtual/jre:1.6 ) )
and
java? ( || ( virtual/jdk:1.7 virtual/jdk:1.6 ) )

app-emulation/virtualbox-4.3.28 installed without issue after replacing these with:

java? ( >=virtual/jre-1.6 )
and
java? ( >=virtual/jdk-1.6 )

Prior to emerging virtualbox, dev-java/oracle-jdk-bin-1.8.0.51 was emerged and  eselected as the system-vm (java-config-2 -L also showed java 1.8 as the default prior to emerging virtualbox), and both virtual/jdk:1.8 and virtual/jre:1.8 were emerged.


Reproducible: Always

Steps to Reproduce:
1. Emerge dev-java/oracle-jdk-bin-1.7.0.80, virtual/jdk:1.7 and virtual/jre:1.7
1. Emerge virtualbox with USE="java"
2. Emerge dev-java/oracle-jdk-bin-1.8.0.51, virtual/jdk:1.7 and virtual/jre:1.7
3. Try to uninstall virtual/jdk:1.7 and virtual/jre:1.7
Actual Results:  
Uninstall fails as virtualbox's ebuilds require virtual/jdk:1.7 and virtual/jre:1.7

Expected Results:  
Uninstall succeeds as virtualbox appears to require java >= 1.6

Changing the dependency enables the removal or old, unsupported and vulnerable versions of oracle jdk.
Comment 1 Brian Evans (RETIRED) gentoo-dev 2015-08-02 00:04:37 UTC
virtual/jdk:1.8 is still marked unstable while app-emulation/virtualbox-4.3.28 is stable.

Even if this was added, you would still need virtual/jdk:1.7 on stable.
Not all implementations of jdk:1.7 are abandoned (see icedtea)
Comment 2 BobbyK 2015-08-02 18:58:07 UTC
Apologies that it wasn't clearer, I'm not suggesting changing virtualbox to depend on 1.8, I'm suggesting >=virtual/[jdk|jre]-1.6.  For those that are on stable virtual/[jdk|jre], there'll be no change until 1.8 is marked stable, and when that happens virtualbox won't require 1.7 to remain.
Comment 3 James Le Cuirot gentoo-dev 2015-08-03 14:08:58 UTC
I'll need to double check it later but I doubt the dependency was set up with the || for any good reason.
Comment 4 Patrice Clement gentoo-dev 2015-08-03 14:19:59 UTC
You almost never need to set up a hard dependency on a jre/jdk (except in some rare cases whereby the package won't compile with Java 8, we have a few tickets in the queue because of that). As BobbyK already pointed out, the correct way to set up Java for an ebuild is to go by the >= operator and specify a minimum required version. The java eclasses will then figure out which jdk/jre are installed on your machine.
Comment 5 Patrice Clement gentoo-dev 2015-08-16 13:53:44 UTC
* commit 12a4bee (HEAD, origin/master, origin/HEAD, master)
| Author: Patrice Clement <monsieurp@gentoo.org>
| Date:   Sun Aug 16 14:52:59 2015 +0000
|
|     app-emulation/virtualbox: remove hard dependency on {jre,jdk}-1.7 and set {jre,jdk}-1.6 as a minimum requirement. Fixes bug 556424.
|
|     Package-Manager: portage-2.2.18
|     Signed-off-by: Patrice Clement <monsieurp@gentoo.org>
|
|  create mode 100644 app-emulation/virtualbox/virtualbox-5.0.0-r1.ebuild