openjdk-8: support rm_work disabled
PATCH 1/1 openjdk-8: support rm_work disabled
From: André Draszik <[email protected]>
Now that generation of the Java keystore actually works (again?),
OE-core commit 09bb7718d74 ("ca-certificates: use relative symlinks from $ETCCERTSDIR"), do_compile() will fail when invoked multiple times.
The reason is that during do_compile(), the Java keytool is used to create a Java keystore with the certificates provided by ca-certificates. Before above OE-core commit, no certificates were actually being added, but as certificates are being added now, multiple do_compile() runs will end up adding the same certificate twice when rm_work is disabled, causing a keytool exception, as that is not allowed.
So let's remove any previously generated keystore before trying to add certificates to it.
---
This applies on top of commit ec5aae3d ("conf: distro: add mejate{,-musl} distributions")
--- recipes-core/openjdk/openjdk-8-native.inc | 1 + 1 file changed, 1 insertion(+)
recipes-core/openjdk/openjdk-8-native.inc +1 -0
@@ -55,6 +55,7 @@ do_configure_prepend() { do_compile_prepend() { export JAVA_TOOL_OPTIONS="${JAVA_TOOL_OPTIONS}" + rm -f "${B}/images/j2sdk-image/jre/lib/security/cacerts" } do_compile_append() {
Signature · 1 line
2.19.0
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 38 lines · André Draszik
From: André Draszik <[email protected]>
Now that generation of the Java keystore actually works (again?),
OE-core commit09bb7718d74("ca-certificates: use relative symlinks from $ETCCERTSDIR"),do_compile()will fail when invoked multiple times.The reason is that during
do_compile(), the Java keytool is used to create a Java keystore with the certificates provided by ca-certificates. Before above OE-core commit, no certificates were actually being added, but as certificates are being added now, multipledo_compile()runs will end up adding the same certificate twice whenrm_workis disabled, causing a keytool exception, as that is not allowed.So let's remove any previously generated keystore before trying to add certificates to it.
Signed-off-by André Draszik <[email protected]>---
This applies on top of commitec5aae3d("conf: distro: add mejate{,-musl} distributions")--- recipes-core/openjdk/openjdk-8-native.inc | 1 + 1 file changed, 1 insertion(+)recipes-core/openjdk/openjdk-8-native.inc +1
-0@@ -55,6 +55,7 @@ do_configure_prepend() { do_compile_prepend() { export JAVA_TOOL_OPTIONS="${JAVA_TOOL_OPTIONS}" + rm -f "${B}/images/j2sdk-image/jre/lib/security/cacerts" } do_compile_append() {