poky/scripts/postinst-intercepts/update_gtk_immodules_cache
Alexander Kanavin 4f3b7477a3 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 <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-06-18 11:07:58 +01:00

782 B

#!/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