diff options
author | Laurentiu Palcu <laurentiu.palcu@intel.com> | 2012-09-18 18:56:04 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-12-06 12:30:34 +0000 |
commit | 74e34f6828771095a25d2c2de89f468b33e359f7 (patch) | |
tree | 6ac09a98fc866e4ad3c2ac3b60bb9bcc2abff88e /meta/classes | |
parent | 927fabf549bb79cc179d2cb0a953dcd515acf464 (diff) | |
download | openembedded-core-74e34f6828771095a25d2c2de89f468b33e359f7.tar.gz openembedded-core-74e34f6828771095a25d2c2de89f468b33e359f7.tar.bz2 openembedded-core-74e34f6828771095a25d2c2de89f468b33e359f7.zip |
gtk-icon-cache: run the icon generation at rootfs time
This change will allow for the icon cache generation at rootfs time and
only once, at the end. So, even though there will be many packages
depending on gtk+, the icon cache generation will be done once.
Hopefully, this will lower the target's first boot time significantly
by using the power of the host machine to generate the cache.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/gtk-icon-cache.bbclass | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/meta/classes/gtk-icon-cache.bbclass b/meta/classes/gtk-icon-cache.bbclass index 01fb2f3946..f87a30fd5b 100644 --- a/meta/classes/gtk-icon-cache.bbclass +++ b/meta/classes/gtk-icon-cache.bbclass @@ -1,12 +1,22 @@ FILES_${PN} += "${datadir}/icons/hicolor" -DEPENDS += "${@['hicolor-icon-theme', '']['${BPN}' == 'hicolor-icon-theme']}" +DEPENDS += "${@['hicolor-icon-theme', '']['${BPN}' == 'hicolor-icon-theme']} gtk+-native" -# This could run on the host as icon cache files are architecture independent, -# but there is no gtk-update-icon-cache built natively. gtk_icon_cache_postinst() { if [ "x$D" != "x" ]; then - exit 1 + 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 + gtk-update-icon-cache -fqt $icondir +done +EOF + fi + exit 0 fi # Update the pixbuf loaders in case they haven't been registered yet |