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 /meta | |
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 'meta')
-rw-r--r-- | meta/classes/gtk-immodules-cache.bbclass | 70 |
1 files changed, 28 insertions, 42 deletions
diff --git a/meta/classes/gtk-immodules-cache.bbclass b/meta/classes/gtk-immodules-cache.bbclass index 3d82dbe9e3..9bb0af8b26 100644 --- a/meta/classes/gtk-immodules-cache.bbclass +++ b/meta/classes/gtk-immodules-cache.bbclass | |||
@@ -10,53 +10,39 @@ GTKIMMODULES_PACKAGES ?= "${PN}" | |||
10 | 10 | ||
11 | gtk_immodule_cache_postinst() { | 11 | gtk_immodule_cache_postinst() { |
12 | if [ "x$D" != "x" ]; then | 12 | if [ "x$D" != "x" ]; then |
13 | if [ -x $D${bindir}/gtk-query-immodules-2.0 ]; then | 13 | $INTERCEPT_DIR/postinst_intercept update_gtk_immodules_cache ${PKG} \ |
14 | IMFILES=$(ls $D${libdir}/gtk-2.0/*/immodules/*.so) | 14 | mlprefix=${MLPREFIX} \ |
15 | ${@qemu_run_binary(d, '$D', '${bindir}/gtk-query-immodules-2.0')} \ | 15 | binprefix=${MLPREFIX} \ |
16 | $IMFILES > $D${libdir}/gtk-2.0/2.10.0/immodules.cache 2>/dev/null && | 16 | libdir=${libdir} \ |
17 | sed -i -e "s:$D::" $D${libdir}/gtk-2.0/2.10.0/immodules.cache | 17 | libexecdir=${libexecdir} \ |
18 | fi | 18 | base_libdir=${base_libdir} \ |
19 | if [ -x $D${bindir}/gtk-query-immodules-3.0 ]; then | 19 | bindir=${bindir} |
20 | IMFILES=$(ls $D${libdir}/gtk-3.0/*/immodules/*.so) | 20 | else |
21 | ${@qemu_run_binary(d, '$D', '${bindir}/gtk-query-immodules-3.0')} \ | 21 | if [ ! -z `which gtk-query-immodules-2.0` ]; then |
22 | $IMFILES > $D${libdir}/gtk-3.0/3.0.0/immodules.cache 2>/dev/null && | 22 | gtk-query-immodules-2.0 > ${libdir}/gtk-2.0/2.10.0/immodules.cache |
23 | sed -i -e "s:$D::" $D${libdir}/gtk-3.0/3.0.0/immodules.cache | 23 | fi |
24 | fi | 24 | if [ ! -z `which gtk-query-immodules-3.0` ]; then |
25 | 25 | gtk-query-immodules-3.0 > ${libdir}/gtk-3.0/3.0.0/immodules.cache | |
26 | [ $? -ne 0 ] && exit 1 | 26 | fi |
27 | exit 0 | ||
28 | fi | ||
29 | if [ ! -z `which gtk-query-immodules-2.0` ]; then | ||
30 | gtk-query-immodules-2.0 > ${libdir}/gtk-2.0/2.10.0/immodules.cache | ||
31 | fi | ||
32 | if [ ! -z `which gtk-query-immodules-3.0` ]; then | ||
33 | gtk-query-immodules-3.0 > ${libdir}/gtk-3.0/3.0.0/immodules.cache | ||
34 | fi | 27 | fi |
35 | } | 28 | } |
36 | 29 | ||
37 | gtk_immodule_cache_postrm() { | 30 | gtk_immodule_cache_postrm() { |
38 | if [ "x$D" != "x" ]; then | 31 | if [ "x$D" != "x" ]; then |
39 | if [ -x $D${bindir}/gtk-query-immodules-2.0 ]; then | 32 | $INTERCEPT_DIR/postinst_intercept update_gtk_immodules_cache ${PKG} \ |
40 | IMFILES=$(ls $D${libdir}/gtk-2.0/*/immodules/*.so) | 33 | mlprefix=${MLPREFIX} \ |
41 | ${@qemu_run_binary(d, '$D', '${bindir}/gtk-query-immodules-2.0')} \ | 34 | binprefix=${MLPREFIX} \ |
42 | $IMFILES > $D${libdir}/gtk-2.0/2.10.0/immodules.cache 2>/dev/null && | 35 | libdir=${libdir} \ |
43 | sed -i -e "s:$D::" $D${libdir}/gtk-2.0/2.10.0/immodules.cache | 36 | libexecdir=${libexecdir} \ |
44 | fi | 37 | base_libdir=${base_libdir} \ |
45 | if [ -x $D${bindir}/gtk-query-immodules-3.0 ]; then | 38 | bindir=${bindir} |
46 | IMFILES=$(ls $D${libdir}/gtk-3.0/*/immodules/*.so) | 39 | else |
47 | ${@qemu_run_binary(d, '$D', '${bindir}/gtk-query-immodules-3.0')} \ | 40 | if [ ! -z `which gtk-query-immodules-2.0` ]; then |
48 | $IMFILES > $D${libdir}/gtk-3.0/3.0.0/immodules.cache 2>/dev/null && | 41 | gtk-query-immodules-2.0 > ${libdir}/gtk-2.0/2.10.0/immodules.cache |
49 | sed -i -e "s:$D::" $D${libdir}/gtk-3.0/3.0.0/immodules.cache | 42 | fi |
50 | fi | 43 | if [ ! -z `which gtk-query-immodules-3.0` ]; then |
51 | 44 | gtk-query-immodules-3.0 > ${libdir}/gtk-3.0/3.0.0/immodules.cache | |
52 | [ $? -ne 0 ] && exit 1 | 45 | fi |
53 | exit 0 | ||
54 | fi | ||
55 | if [ ! -z `which gtk-query-immodules-2.0` ]; then | ||
56 | gtk-query-immodules-2.0 > ${libdir}/gtk-2.0/2.10.0/immodules.cache | ||
57 | fi | ||
58 | if [ ! -z `which gtk-query-immodules-3.0` ]; then | ||
59 | gtk-query-immodules-3.0 > ${libdir}/gtk-3.0/3.0.0/immodules.cache | ||
60 | fi | 46 | fi |
61 | } | 47 | } |
62 | 48 | ||