[oe] [meta-java][PATCH] openjdk-8, openjre-8: Fix PROVIDES assignment

André Draszik git at andred.net
Mon Sep 17 14:11:34 UTC 2018


On Fri, 2018-09-07 at 13:44 +0300, Yevgeny Popovych wrote:
> PROVIDES is a recipe-specific variable, not package-specific like
> RPROVIDES.
> This bug would prevent you from having recipes DEPEND on java2-runtime
> or java2-vm (assuming you have set PREFERRED_PROVIDER correctly).

Looking at all uses of this, I don't think the intention is to be able to
DEPENDS on java2-vm or java2-runtime at all.

Regarding java2-vm:

java2-vm was originally used in the OpenJDK 6 & 7 recipes to be able to
select shark, zero, cacao, or jamvm VMs. OpenJDK-6 is not available any
more, and OpenJDK-7 has removed support for most of this in commit
38f4c1365c11 ("openjdk7: remove broken/unsupported VM's")

It is not clear why it was added to the OpenJDK-8 recipe either.

Given OpenJDK-7 has no way of using the VM compiled as part of OpenJDK-8,
and given that no part of the OpenJDK-8 makes use of the java2-vm part, the
correct solution here is to actually *remove* the incorrect PROVIDES
statement for java2-vm completely.


Regarding java2-runtime:

Again, looking at the other uses of this:
java2-runtime is a virtual runtime package name, which is provided by
different *runtime* packages (created by the OpenJDK-7, OpenJDK-8, JamVM, or
Cacao recipes). Other recipes only ever RDEPEND on java2-runtime. It makes
not sense for OpenJDK-8 to PROVIDES java2-runtime given the above.

So for this, PROVIDES_${PN} = "java2-runtime" should be indeed removed, but
without any replacement.


Cheers,
Andre'

> 
> Change-Id: I602d98241d2a6f42a13a1fa1edad049d4e8792b0
> Signed-off-by: Yevgeny Popovych <yevgenyp at pointgrab.com>
> ---
>  recipes-core/openjdk/openjdk-8_172b11.bb | 4 ++--
>  recipes-core/openjdk/openjre-8_172b11.bb | 4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/recipes-core/openjdk/openjdk-8_172b11.bb b/recipes-
> core/openjdk/openjdk-8_172b11.bb
> index c1c6e1e..22d0113 100644
> --- a/recipes-core/openjdk/openjdk-8_172b11.bb
> +++ b/recipes-core/openjdk/openjdk-8_172b11.bb
> @@ -47,10 +47,10 @@ FILES_${PN}-doc_append = "\
>  
>  FILES_${PN}-source = " ${JDK_HOME}/src.zip "
>  
> +PROVIDES = "java2-vm"
> +PROVIDES = "java2-runtime"
>  RPROVIDES_${PN} = "java2-vm"
> -PROVIDES_${PN} = "java2-vm"
>  RPROVIDES_${PN} = "java2-runtime"
> -PROVIDES_${PN} = "java2-runtime"
>  
>  inherit update-alternatives
>  
> diff --git a/recipes-core/openjdk/openjre-8_172b11.bb b/recipes-
> core/openjdk/openjre-8_172b11.bb
> index dd29691..d8d4ba8 100644
> --- a/recipes-core/openjdk/openjre-8_172b11.bb
> +++ b/recipes-core/openjdk/openjre-8_172b11.bb
> @@ -35,10 +35,10 @@ FILES_${PN}-doc_append = "\
>      ${JRE_HOME}/THIRD_PARTY_README \
>  "
>  
> +PROVIDES = "java2-vm"
> +PROVIDES = "java2-runtime"
>  RPROVIDES_${PN} = "java2-vm"
> -PROVIDES_${PN} = "java2-vm"
>  RPROVIDES_${PN} = "java2-runtime"
> -PROVIDES_${PN} = "java2-runtime"
>  
>  inherit update-alternatives
>  
> -- 
> 2.7.4
> 




More information about the Openembedded-devel mailing list