Skip to contentSkip to conversation

gio-module-cache : fix build warning when using qemu usermode

PATCH New Jibin Xu 1 participant 1 message Dec 28, 2017

lore
Share & tools
lore

Jibin Xu

author
#0 lore raw

PATCH 1/1 gio-module-cache : fix build warning when using qemu usermode

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.

---
 meta/classes/gio-module-cache.bbclass | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
meta/classes/gio-module-cache.bbclass +5 -1
index a8190b7b89..f211bad743 100644
@@ -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
Signature · 1 line
2.13.0