Commit 86aaecf9 authored by Martin Jansa's avatar Martin Jansa Committed by Richard Purdie

gio-module-cache.bbclass: disable update_gio_module_cache postinst script for nativesdk

* it fails to execute native binary inside the qemu usermode for target
  arch as shown e.g. for qemuarm and raspberrypi3 build on x86_64
  builder:

  qemuarm-webos-linux-gnueabi/webos-ndk-basic/1.0.0-1-r3/temp/log.do_populate_sdk:
    NOTE: > Executing update_gio_module_cache-nativesdk intercept ...
    WARNING: The postinstall intercept hook 'update_gio_module_cache-nativesdk' failed, details in log.do_populate_sdk
    qemuarm-webos-linux-gnueabi/webos-ndk-basic/1.0.0-1-r3/sdk/image/opt/webos-sdk-x86_64/7.0~s14/sysroots/x86_64-webossdk-linux/usr/libexec/nativesdk-gio-querymodules: Invalid ELF image for this architecture

  qemuarm-webos-linux-gnueabi/my-sdk/1.0.0-1-r3/sdk/image/opt/webos-sdk-x86_64/7.0~s14/sysroots/armv5te-webos-linux-gnueabi/usr/libexec/gio-querymodules:
    ELF 32-bit LSB  executable, ARM, EABI5 version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 3.2.0, BuildID[sha1]=5b7f0c77e8ee9587f4e02eaf1d54a1e230e539bd, stripped
  qemuarm-webos-linux-gnueabi/my-sdk/1.0.0-1-r3/sdk/image/opt/webos-sdk-x86_64/7.0~s14/sysroots/x86_64-webossdk-linux/usr/libexec/nativesdk-gio-querymodules:
    ELF 64-bit LSB  executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 3.2.0, BuildID[sha1]=eeded124aa53c7ac997dd6326e5d9b75e8d9c43d, stripped

  qemuarm-webos-linux-gnueabi/webos-ndk-basic/1.0.0-1-r3/intercept_scripts-ac629c4abfb418548877d2a412f7e552bd21e66f0b645b8875dc56ed9f0df40d/update_gio_module_cache-nativesdk
bindir=/opt/webos-sdk-x86_64/7.0~s14/sysroots/x86_64-webossdk-linux/usr/bin
base_libdir=/opt/webos-sdk-x86_64/7.0~s14/sysroots/x86_64-webossdk-linux/lib
libexecdir=/opt/webos-sdk-x86_64/7.0~s14/sysroots/x86_64-webossdk-linux/usr/libexec
libdir=/opt/webos-sdk-x86_64/7.0~s14/sysroots/x86_64-webossdk-linux/usr/lib
binprefix=nativesdk-

set -e

PSEUDO_UNLOAD=1 qemuwrapper -L $D -E
LD_LIBRARY_PATH=$D${libdir}:$D${base_libdir} \
        $D${libexecdir}/${binprefix}gio-querymodules
$D${libdir}/gio/modules/

[ ! -e $D${libdir}/gio/modules/giomodule.cache ] ||
        chown root:root $D${libdir}/gio/modules/giomodule.cache

  raspberrypi3-webos-linux-gnueabi/webos-ndk-basic/1.0.0-1-r3/temp/log.do_populate_sdk:
    NOTE: > Executing update_gio_module_cache-nativesdk intercept ...
    WARNING: The postinstall intercept hook 'update_gio_module_cache-nativesdk' failed, details in log.do_populate_sdk
    raspberrypi3-webos-linux-gnueabi/webos-ndk-basic/1.0.0-1-r3/sdk/image/opt/webos-sdk-x86_64/7.0~s14/sysroots/x86_64-webossdk-linux/usr/libexec/nativesdk-gio-querymodules: Invalid ELF image for this architecture

  raspberrypi3-webos-linux-gnueabi/my-sdk/1.0.0-1-r3/sdk/image/opt/webos-sdk-x86_64/7.0~s14/sysroots/cortexa7t2hf-neon-vfpv4-webos-linux-gnueabi/usr/libexec/gio-querymodules:
    ELF 32-bit LSB  executable, ARM, EABI5 version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 3.2.0, BuildID[sha1]=5267f1e542b014522af5ab54443d768ba6b47351, stripped
  raspberrypi3-webos-linux-gnueabi/my-sdk/1.0.0-1-r3/sdk/image/opt/webos-sdk-x86_64/7.0~s14/sysroots/x86_64-webossdk-linux/usr/libexec/nativesdk-gio-querymodules:
    ELF 64-bit LSB  executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 3.2.0, BuildID[sha1]=eeded124aa53c7ac997dd6326e5d9b75e8d9c43d, stripped

  raspberrypi3-webos-linux-gnueabi/webos-ndk-basic/1.0.0-1-r3/intercept_scripts-a4270d1427cca0a9d172dbcd8dc262957c8e081c657e1123cc9ad551d65f22ea/update_gio_module_cache-nativesdk
bindir=/opt/webos-sdk-x86_64/7.0~s14/sysroots/x86_64-webossdk-linux/usr/bin
base_libdir=/opt/webos-sdk-x86_64/7.0~s14/sysroots/x86_64-webossdk-linux/lib
libexecdir=/opt/webos-sdk-x86_64/7.0~s14/sysroots/x86_64-webossdk-linux/usr/libexec
libdir=/opt/webos-sdk-x86_64/7.0~s14/sysroots/x86_64-webossdk-linux/usr/lib
binprefix=nativesdk-

set -e

PSEUDO_UNLOAD=1 qemuwrapper -L $D -E
LD_LIBRARY_PATH=$D${libdir}:$D${base_libdir} \
        $D${libexecdir}/${binprefix}gio-querymodules
$D${libdir}/gio/modules/

[ ! -e $D${libdir}/gio/modules/giomodule.cache ] ||
        chown root:root $D${libdir}/gio/modules/giomodule.cache

* it isn't needed in master, because nativesdk postinst were fixed by:
  commit d10fd6ae3fe46290c6e3a5250878966d9f12ca3f
  Author: Alexander Kanavin <alexander.kanavin@linux.intel.com>
  Date:   Mon Jun 11 16:38:20 2018 +0300
  Subject: qemuwrapper-cross: enable multilib and nativesdk variants of the script
* which depends on:
  commit d4f5b8e26acaadffac6df10f9a9d9ebfb3045f5f
  Author: Alexander Kanavin <alexander.kanavin@linux.intel.com>
  Date:   Mon Jun 11 16:38:17 2018 +0300
  Subject: gtk-immodules-cache.bbclass: convert cache creation to postinst_intercept mechanism

* backporting just these 2 isn't enough, we would need to backport
  something else as well, otherwise it fails with:
  webos-ndk-basic/1.0.0-1-r3/intercept_scripts-a4270d1427cca0a9d172dbcd8dc262957c8e081c657e1123cc9ad551d65f22ea/update_gio_module_cache-nativesdk:
  nativesdk-qemuwrapper: not found

  and at this point I would rather safely disable it for nativesdk
  in sumo instead of backporting bunch more commits to stable branch

(From OE-Core rev: 11487d960e8a10ba9f33cffaa631e941b8874fa6)
Signed-off-by: 's avatarMartin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: 's avatarArmin Kuster <akuster808@gmail.com>
Signed-off-by: 's avatarRichard Purdie <richard.purdie@linuxfoundation.org>
parent 13dc9eed
......@@ -2,6 +2,7 @@ PACKAGE_WRITE_DEPS += "qemu-native"
inherit qemu
GIO_MODULE_PACKAGES ??= "${PN}"
GIO_MODULE_PACKAGES_class-nativesdk = ""
gio_module_cache_common() {
if [ "x$D" != "x" ]; then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment