gio-module-cache uses qemu usermode by default, but some architecture
such as Intel skylake does not support qemu usermode, this can
lead to a build warning as below:
"WARNING: The postinstall intercept hook 'update_gio_module_cache' failed".

Add a judgement of qemu usermode to fix the build warning.

Signed-off-by: Jibin Xu <jibin...@windriver.com>
---
 meta/classes/gio-module-cache.bbclass | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/meta/classes/gio-module-cache.bbclass 
b/meta/classes/gio-module-cache.bbclass
index a8190b7b89..f211bad743 100644
--- a/meta/classes/gio-module-cache.bbclass
+++ b/meta/classes/gio-module-cache.bbclass
@@ -5,12 +5,16 @@ GIO_MODULE_PACKAGES ??= "${PN}"
 
 gio_module_cache_common() {
 if [ "x$D" != "x" ]; then
-    $INTERCEPT_DIR/postinst_intercept update_gio_module_cache ${PKG} \
+    if ${@bb.utils.contains('MACHINE_FEATURES', 'qemu-usermode', 
'true','false', d)}; then
+        $INTERCEPT_DIR/postinst_intercept update_gio_module_cache ${PKG} \
             mlprefix=${MLPREFIX} \
             binprefix=${MLPREFIX} \
             libdir=${libdir} \
             base_libdir=${base_libdir} \
             bindir=${bindir}
+    else
+        exit 1
+    fi
 else
     ${libexecdir}/${MLPREFIX}gio-querymodules ${libdir}/gio/modules/
 fi
-- 
2.13.0

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to