summaryrefslogtreecommitdiff
path: root/meta/classes/gtk-immodules-cache.bbclass
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:25:34 +0000
commitdc1bb7a5532411bc9cb7e8678bc540c44fd2cd63 (patch)
tree5d8c9fb012fb4d590b64adf87a5974dc1cf04c7f /meta/classes/gtk-immodules-cache.bbclass
parent6ae0b8339134300d0c179bd47dc3062e0e1f2f0b (diff)
downloadopenembedded-core-dc1bb7a5532411bc9cb7e8678bc540c44fd2cd63.tar.gz
openembedded-core-dc1bb7a5532411bc9cb7e8678bc540c44fd2cd63.tar.bz2
openembedded-core-dc1bb7a5532411bc9cb7e8678bc540c44fd2cd63.zip
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] Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta/classes/gtk-immodules-cache.bbclass')
-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
gtk_immodule_cache_postrm() {
if [ "x$D" != "x" ]; then
- exit 1
+ for maj_ver in 2 3; do
+ if [ -x $D${bindir}/gtk-query-immodules-$maj_ver.0 ]; then
+ IMFILES=$(ls $D${libdir}/gtk-$maj_ver.0/*/immodules/*.so)
+ ${@qemu_run_binary(d, '$D', '${bindir}/gtk-query-immodules-$maj_ver.0')} \
+ $IMFILES > $D/etc/gtk-$maj_ver.0/gtk.immodules 2>/dev/null &&
+ sed -i -e "s:$D::" $D/etc/gtk-$maj_ver.0/gtk.immodules
+
+ [ $? -ne 0 ] && exit 1
+ fi
+ done
+
+ exit 0
fi
if [ ! -z `which gtk-query-immodules-2.0` ]; then
gtk-query-immodules-2.0 > /etc/gtk-2.0/gtk.immodules