summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHongxu Jia <hongxu.jia@windriver.com>2013-01-17 20:56:40 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-01-28 12:29:29 +0000
commit44f232f6f8d03fe4e1873fee4cd2f6c61801a510 (patch)
treec19179c85d1e9cc8909da21c8bffcd814383af8f
parent92209ae0cb4f6daa04536ff6fecbeec0afcbfe87 (diff)
downloadpoky-44f232f6f8d03fe4e1873fee4cd2f6c61801a510.tar.gz
gtk-immodules-cache.bbclass:fix support postrm at image creation time
Let postrm use the same logic as the postinst to run on both build machine and target [YOCTO #3633] (From OE-Core rev: dc1bb7a5532411bc9cb7e8678bc540c44fd2cd63) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/gtk-immodules-cache.bbclass13
1 files changed, 12 insertions, 1 deletions
diff --git a/meta/classes/gtk-immodules-cache.bbclass b/meta/classes/gtk-immodules-cache.bbclass
index 9ffb03b9da..a8855af60d 100644
--- a/meta/classes/gtk-immodules-cache.bbclass
+++ b/meta/classes/gtk-immodules-cache.bbclass
@@ -31,7 +31,18 @@ fi
31 31
32gtk_immodule_cache_postrm() { 32gtk_immodule_cache_postrm() {
33if [ "x$D" != "x" ]; then 33if [ "x$D" != "x" ]; then
34 exit 1 34 for maj_ver in 2 3; do
35 if [ -x $D${bindir}/gtk-query-immodules-$maj_ver.0 ]; then
36 IMFILES=$(ls $D${libdir}/gtk-$maj_ver.0/*/immodules/*.so)
37 ${@qemu_run_binary(d, '$D', '${bindir}/gtk-query-immodules-$maj_ver.0')} \
38 $IMFILES > $D/etc/gtk-$maj_ver.0/gtk.immodules 2>/dev/null &&
39 sed -i -e "s:$D::" $D/etc/gtk-$maj_ver.0/gtk.immodules
40
41 [ $? -ne 0 ] && exit 1
42 fi
43 done
44
45 exit 0
35fi 46fi
36if [ ! -z `which gtk-query-immodules-2.0` ]; then 47if [ ! -z `which gtk-query-immodules-2.0` ]; then
37 gtk-query-immodules-2.0 > /etc/gtk-2.0/gtk.immodules 48 gtk-query-immodules-2.0 > /etc/gtk-2.0/gtk.immodules