]> code.ossystems Code Review - openembedded-core.git/commitdiff
gtk-icon-cache.bbclass:fix support postrm at image creation time
authorHongxu Jia <hongxu.jia@windriver.com>
Thu, 17 Jan 2013 12:56:37 +0000 (20:56 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 28 Jan 2013 12:25:34 +0000 (12:25 +0000)
When use postrm on the build machine, it installs the hook in intercept-scripts
directory and exit 0, the hook will be later invoked and it will properly call
gtk-update-icon-cache.

[YOCTO #3633]

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
meta/classes/gtk-icon-cache.bbclass

index 7c7dd788542542dd8fb3a191bfc374a41ec22dec..d5fdcd521d83c8a285057d04a2139191b9869c37 100644 (file)
@@ -32,6 +32,24 @@ done
 }
 
 gtk_icon_cache_postrm() {
+if [ "x$D" != "x" ]; then
+    if [ ! -f $INTERCEPT_DIR/update_icon_cache ]; then
+        cat << "EOF" > $INTERCEPT_DIR/update_icon_cache
+#!/bin/sh
+
+# update native pixbuf loaders
+gdk-pixbuf-query-loaders --update-cache
+
+for icondir in $D/usr/share/icons/*/ ; do
+    if [ -d $icondir ] ; then
+        gtk-update-icon-cache -fqt  $icondir
+    fi
+done
+EOF
+    fi
+    exit 0
+fi
+
 for icondir in /usr/share/icons/* ; do
     if [ -d $icondir ] ; then
         gtk-update-icon-cache -qt  $icondir