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 11:07:58 +0100 |
commit | 4f3b7477a38f271a23db4d57c7444dc615a00716 (patch) | |
tree | 5e5786688bca4005992bfd4764be6fbb369b2c1b /scripts/postinst-intercepts/update_gtk_immodules_cache | |
parent | 76b414c3cdfd869ea051b0bb26d21a0b73a8b8da (diff) | |
download | poky-4f3b7477a38f271a23db4d57c7444dc615a00716.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.
(From OE-Core rev: cca3c084b6c9bf600d7306e3fe12c4f236b78656)
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/update_gtk_immodules_cache')
-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 0000000000..e2b9ff7438 --- /dev/null +++ b/scripts/postinst-intercepts/update_gtk_immodules_cache | |||
@@ -0,0 +1,18 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | set -e | ||
4 | |||
5 | if [ -x $D${bindir}/gtk-query-immodules-2.0 ]; then | ||
6 | PSEUDO_UNLOAD=1 qemuwrapper -L $D -E LD_LIBRARY_PATH=$D${libdir}:$D${base_libdir} \ | ||
7 | $D/${bindir}/gtk-query-immodules-2.0 \ | ||
8 | > $D${libdir}/gtk-2.0/2.10.0/immodules.cache && | ||
9 | sed -i -e "s:$D::" $D${libdir}/gtk-2.0/2.10.0/immodules.cache | ||
10 | chown root:root $D${libdir}/gtk-2.0/2.10.0/immodules.cache | ||
11 | fi | ||
12 | if [ -x $D${bindir}/gtk-query-immodules-3.0 ]; then | ||
13 | PSEUDO_UNLOAD=1 qemuwrapper -L $D -E LD_LIBRARY_PATH=$D${libdir}:$D${base_libdir} \ | ||
14 | $D/${bindir}/gtk-query-immodules-3.0 \ | ||
15 | > $D${libdir}/gtk-3.0/3.0.0/immodules.cache && | ||
16 | sed -i -e "s:$D::" $D${libdir}/gtk-3.0/3.0.0/immodules.cache | ||
17 | chown root:root $D${libdir}/gtk-3.0/3.0.0/immodules.cache | ||
18 | fi | ||