From 4f3b7477a38f271a23db4d57c7444dc615a00716 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Mon, 11 Jun 2018 16:38:17 +0300 Subject: gtk-immodules-cache.bbclass: convert cache creation to postinst_intercept mechanism This has the following benefits: - consistent with how the other caches are created into target rootfs - only runs once per package manager transaction, instead of once per every immodule package - correctly postpones to first boot if qemu is not working; from postinst itself this would've required special arrangements to avoid what is now a do_rootfs failure. (From OE-Core rev: cca3c084b6c9bf600d7306e3fe12c4f236b78656) Signed-off-by: Alexander Kanavin Signed-off-by: Richard Purdie --- scripts/postinst-intercepts/update_gtk_immodules_cache | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 scripts/postinst-intercepts/update_gtk_immodules_cache (limited to 'scripts/postinst-intercepts') diff --git a/scripts/postinst-intercepts/update_gtk_immodules_cache b/scripts/postinst-intercepts/update_gtk_immodules_cache new file mode 100644 index 0000000000..e2b9ff7438 --- /dev/null +++ b/scripts/postinst-intercepts/update_gtk_immodules_cache @@ -0,0 +1,18 @@ +#!/bin/sh + +set -e + +if [ -x $D${bindir}/gtk-query-immodules-2.0 ]; then + PSEUDO_UNLOAD=1 qemuwrapper -L $D -E LD_LIBRARY_PATH=$D${libdir}:$D${base_libdir} \ + $D/${bindir}/gtk-query-immodules-2.0 \ + > $D${libdir}/gtk-2.0/2.10.0/immodules.cache && + sed -i -e "s:$D::" $D${libdir}/gtk-2.0/2.10.0/immodules.cache + chown root:root $D${libdir}/gtk-2.0/2.10.0/immodules.cache +fi +if [ -x $D${bindir}/gtk-query-immodules-3.0 ]; then + PSEUDO_UNLOAD=1 qemuwrapper -L $D -E LD_LIBRARY_PATH=$D${libdir}:$D${base_libdir} \ + $D/${bindir}/gtk-query-immodules-3.0 \ + > $D${libdir}/gtk-3.0/3.0.0/immodules.cache && + sed -i -e "s:$D::" $D${libdir}/gtk-3.0/3.0.0/immodules.cache + chown root:root $D${libdir}/gtk-3.0/3.0.0/immodules.cache +fi -- cgit v1.2.3-54-g00ecf