archiver.bbclass will invoke do_unpack as a function (rather than a
task) during do_unpack_and_patch. When invoked as a function, the
postfuncs of do_unpack are not executed.

Convert the postfuncs into an _append fragment on do_unpack instead.

Fixes:

    .. snip ..
    No file to patch.  Skipping patch.
    1 out of 1 hunk ignored
    Patch 1001-hotspot-fix-crash-on-JNI_CreateJavaVM.patch does not apply 
(enforce with -f)
    ERROR: Logfile of failure stored in: .. snip .. 
/build/tmp/work/x86_64-linux/openjdk-8-native/252-r0/temp/log.do_unpack_and_patch.220625
    ERROR: Task (.. snip .. 
/sources/openembedded-core/meta-java/recipes-core/openjdk/openjdk-8-native_252.bb:do_unpack_and_patch)
 failed with exit code '1'
---
 recipes-core/openjdk/openjdk-8-common.inc | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/recipes-core/openjdk/openjdk-8-common.inc 
b/recipes-core/openjdk/openjdk-8-common.inc
index c78bb2a..123e896 100644
--- a/recipes-core/openjdk/openjdk-8-common.inc
+++ b/recipes-core/openjdk/openjdk-8-common.inc
@@ -46,6 +46,13 @@ do_unpack_delete_X11_wrappers() {
     find ${S}/jdk/src/solaris/classes/sun/awt/X11 -maxdepth 1 -name '*.java' 
-delete
 }
 
+do_unpack_append() {
+    bb.build.exec_func('do_unpack_extract_submodules', d)
+
+    if not bb.utils.filter('PACKAGECONFIG', 'x11', d):
+        bb.build.exec_func('do_unpack_delete_X11_wrappers', d)
+}
+
 def package_config_option_cleanup(d):
     distro_x11 = bb.utils.contains('DISTRO_FEATURES', 'x11', True, False, d)
     distro_alsa = bb.utils.contains('DISTRO_FEATURES', 'alsa', True, False, d)
@@ -155,9 +162,6 @@ def jdk_configure_options(d):
     options = package_config_option_cleanup(d)
     return options[3]
 
-do_unpack[postfuncs] += "do_unpack_extract_submodules"
-do_unpack[postfuncs] += "${@bb.utils.contains('PACKAGECONFIG', 'x11', '', 
'do_unpack_delete_X11_wrappers', d)}"
-
 export DEBUG_BINARIES = "true"
 
 ALTERNATIVE_PRIORITY = "50"
-- 
2.26.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#86161): 
https://lists.openembedded.org/g/openembedded-devel/message/86161
Mute This Topic: https://lists.openembedded.org/mt/76005747/21656
Group Owner: openembedded-devel+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to