[oe] [meta-java][RFC][PATCH 3/7] openjdk-8: add meaningful (R)PROVIDES

Richard Leitner richard.leitner at skidata.com
Thu Aug 2 10:42:05 UTC 2018


Hi André,
again: thank you and feel free to add

Acked-by: Richard Leitner <richard.leitner at skidata.com>

regards;Richard.L

On 07/27/2018 03:29 PM, André Draszik wrote:
> From: André Draszik <andre.draszik at jci.com>
> 
> 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 <andre.draszik at jci.com>
> ---
>  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
>  
> 



More information about the Openembedded-devel mailing list