diff options
author | Alexander Kanavin <alexander.kanavin@linux.intel.com> | 2018-06-11 16:38:17 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-06-18 10:59:33 +0100 |
commit | cca3c084b6c9bf600d7306e3fe12c4f236b78656 (patch) | |
tree | f0b4247dd5a393efa04c2602bd8ea735cfa8aed9 /scripts/postinst-intercepts | |
parent | 3c368282741e9de1f96988e127b86a6a01b6a26f (diff) | |
download | openembedded-core-contrib-cca3c084b6c9bf600d7306e3fe12c4f236b78656.tar.gz |
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.
Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/postinst-intercepts')
-rw-r--r-- | scripts/postinst-intercepts/update_gtk_immodules_cache | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/scripts/postinst-intercepts/update_gtk_immodules_cache b/scripts/postinst-intercepts/update_gtk_immodules_cache new file mode 100644 index 00000000000..e2b9ff74382 --- /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 |