Skip to contentSkip to conversation

openjdk-8, openjre-8: Fix PROVIDES assignment

PATCH In review Yevgeny Popovych 3 participants 6 messages Sep 7, 2018 – Sep 19, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 openjdk-8, openjre-8: Fix PROVIDES assignment

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).

Change-Id I602d98241d2a6f42a13a1fa1edad049d4e8792b0
---
 recipes-core/openjdk/openjdk-8_172b11.bb | 4 ++--
 recipes-core/openjdk/openjre-8_172b11.bb | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
recipes-core/openjdk/openjdk-8_172b11.bb +2 -2
index c1c6e1e..22d0113 100644
@@ -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
 
recipes-core/openjdk/openjre-8_172b11.bb +2 -2
index dd29691..d8d4ba8 100644
@@ -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
 
Signature · 1 line
2.7.4
#1 lore raw

Hi,
this is a note to let you know that I've just added this patch to the master-next branch of the meta-java repository at
git://git.yoctoproject.org/meta-java

As soon as it has gone through some more testing it will likely be merged to the master branch.

If you have any questions, please let me know.

regards;Richard.L

Quoted 5 lines · Yevgeny Popovych

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).

#2 lore raw

Hi Richard,

Quoted 9 lines · Richard Leitner

Hi,
this is a note to let you know that I've just added this patch to the master-next branch of the meta-java repository at
git://git.yoctoproject.org/meta-java

As soon as it has gone through some more testing it will likely be merged to the master branch.

If you have any questions, please let me know.

I'd say please remove this patch from the queue.

Thanks,
Andre'

Quoted 10 lines

regards;Richard.L

Quoted 6 lines · Yevgeny Popovych

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).

#3 lore raw

Hi André,
thanks for giving those patches another pair of eyes.

IMHO you're right with your analysis and we should drop those PROVIDES. I'll apply your latest patch to master-next instead after a quick test.

Furthermore I'll do some more openjdk-7 vm cleanup as AFAIK there are some not required remains in the recipes.

regards;Richard.L

Quoted 29 lines · André Draszik

Hi Richard,

Quoted 9 lines · Richard Leitner

Hi,
this is a note to let you know that I've just added this patch to the master-next branch of the meta-java repository at
git://git.yoctoproject.org/meta-java

As soon as it has gone through some more testing it will likely be merged to the master branch.

If you have any questions, please let me know.

I'd say please remove this patch from the queue.

Thanks,
Andre'

Quoted 10 lines

regards;Richard.L

Quoted 6 lines · Yevgeny Popovych

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).

#4 lore raw
In reply to Yevgeny Popovych
Quoted 4 lines · Yevgeny Popovych

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'

Quoted 47 lines
Change-Id I602d98241d2a6f42a13a1fa1edad049d4e8792b0
---
 recipes-core/openjdk/openjdk-8_172b11.bb | 4 ++--
 recipes-core/openjdk/openjre-8_172b11.bb | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
recipes- renamed from recipes-core/openjdk/openjdk-8_172b11.bb +0 -0

core/openjdk/openjdk-8_172b11.bb
index c1c6e1e..22d0113 100644

recipes-core/openjdk/openjdk-8_172b11.bb +2 -2
@@ -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
 
recipes- renamed from recipes-core/openjdk/openjre-8_172b11.bb +0 -0

core/openjdk/openjre-8_172b11.bb
index dd29691..d8d4ba8 100644

recipes-core/openjdk/openjre-8_172b11.bb +2 -2
@@ -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
 
Signature · 1 line
2.7.4
#5 lore raw
Quoted 26 lines · André Draszik
Quoted 4 lines · Yevgeny Popovych

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:

Quoted 8 lines

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.

In general I agree.

For my specific use-case I wanted to pull java2-runtime
as a build time dependency (therefore DEPENDS) to be able to take JKS from it, and so I went to fix this.
But since this variant of ca-certificates-java can generate
the keystore by itself I can skip this part.

Quoted 53 lines

Cheers,
Andre'

Quoted 47 lines
Change-Id I602d98241d2a6f42a13a1fa1edad049d4e8792b0
---
 recipes-core/openjdk/openjdk-8_172b11.bb | 4 ++--
 recipes-core/openjdk/openjre-8_172b11.bb | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
recipes- renamed from recipes-core/openjdk/openjdk-8_172b11.bb +0 -0

core/openjdk/openjdk-8_172b11.bb
index c1c6e1e..22d0113 100644

recipes-core/openjdk/openjdk-8_172b11.bb +2 -2
@@ -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
 
recipes- renamed from recipes-core/openjdk/openjre-8_172b11.bb +0 -0

core/openjdk/openjre-8_172b11.bb
index dd29691..d8d4ba8 100644

recipes-core/openjdk/openjre-8_172b11.bb +2 -2
@@ -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
 
Signature · 1 line
2.7.4
Signature · 2 lines
Sincerely,
Yevgeny Popovych