diff options
author | Hongxu Jia <hongxu.jia@windriver.com> | 2013-01-17 20:56:37 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-01-28 12:25:34 +0000 |
commit | 6ae0b8339134300d0c179bd47dc3062e0e1f2f0b (patch) | |
tree | 9cf5813f42708e23621a0f632e1e6c23890a8af5 /meta/classes/gtk-icon-cache.bbclass | |
parent | dc78ef91a2bf01efb8028c9afbe69e506e016265 (diff) | |
download | openembedded-core-6ae0b8339134300d0c179bd47dc3062e0e1f2f0b.tar.gz openembedded-core-6ae0b8339134300d0c179bd47dc3062e0e1f2f0b.tar.bz2 openembedded-core-6ae0b8339134300d0c179bd47dc3062e0e1f2f0b.zip |
gtk-icon-cache.bbclass:fix support postrm at image creation time
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>
Diffstat (limited to 'meta/classes/gtk-icon-cache.bbclass')
-rw-r--r-- | meta/classes/gtk-icon-cache.bbclass | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/meta/classes/gtk-icon-cache.bbclass b/meta/classes/gtk-icon-cache.bbclass index 7c7dd78854..d5fdcd521d 100644 --- a/meta/classes/gtk-icon-cache.bbclass +++ b/meta/classes/gtk-icon-cache.bbclass @@ -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 |