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.
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)
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.
I'll need to double check it later but I doubt the dependency was set up with the || for any good reason.
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.
* 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