From: André Draszik <[email protected]> Then OpenJDK8 recipe provides a Java SDK, and a Java Runtime. It is compatible with Java versions 5 through 8 (including), so add appropriate (R)PROVIDES, so that recipes depending on it can can specify that virtual dependency, rather than hard-coding to openjdk-8. This makes it possible to: a) add OpenJDK9 and OpenJDK10 recipes in the future without much disruption b) use a different provider than OpenJDK, e.g. Oracle Java, or Zulu Java
This is the approach taken by e.g. Debian. Signed-off-by: André Draszik <[email protected]> --- recipes-core/openjdk/openjdk-8_172b11.bb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/recipes-core/openjdk/openjdk-8_172b11.bb b/recipes-core/openjdk/openjdk-8_172b11.bb index 9c2a7a1..77c2a57 100644 --- a/recipes-core/openjdk/openjdk-8_172b11.bb +++ b/recipes-core/openjdk/openjdk-8_172b11.bb @@ -45,10 +45,10 @@ FILES_${PN}-doc_append = "\ FILES_${PN}-source = " ${JDK_HOME}/src.zip " -RPROVIDES_${PN} = "java2-vm" -PROVIDES_${PN} = "java2-vm" -RPROVIDES_${PN} = "java2-runtime" -PROVIDES_${PN} = "java2-runtime" +PROVIDES = "java2-vm java2-runtime" +PROVIDES += "${@' '.join('virtual/java'+str(x)+'-sdk virtual/java'+str(x)+'-runtime' for x in range(5,9))}" +RPROVIDES_${PN} = "java2-vm java2-runtime" +RPROVIDES_${PN} += "${@' '.join('virtual-java'+str(x)+'-sdk virtual-java'+str(x)+'-runtime' for x in range(5,9))}" inherit update-alternatives -- 2.18.0 -- _______________________________________________ Openembedded-devel mailing list [email protected] http://lists.openembedded.org/mailman/listinfo/openembedded-devel
