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:31:09 +0000 |
commit | dec1e7fdcee5980202c36cb43597fc9110103312 (patch) | |
tree | 932a950bd98bec90777045f02ed13b022aa60a61 /meta/classes/gtk-icon-cache.bbclass | |
parent | fd401f292ebca8d905783ef15b9b347f80d6f899 (diff) | |
download | poky-dec1e7fdcee5980202c36cb43597fc9110103312.tar.gz |
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.
(From OE-Core rev: 74e34f6828771095a25d2c2de89f468b33e359f7)
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/gtk-icon-cache.bbclass')
-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 @@ | |||
1 | FILES_${PN} += "${datadir}/icons/hicolor" | 1 | FILES_${PN} += "${datadir}/icons/hicolor" |
2 | 2 | ||
3 | DEPENDS += "${@['hicolor-icon-theme', '']['${BPN}' == 'hicolor-icon-theme']}" | 3 | DEPENDS += "${@['hicolor-icon-theme', '']['${BPN}' == 'hicolor-icon-theme']} gtk+-native" |
4 | 4 | ||
5 | # This could run on the host as icon cache files are architecture independent, | ||
6 | # but there is no gtk-update-icon-cache built natively. | ||
7 | gtk_icon_cache_postinst() { | 5 | gtk_icon_cache_postinst() { |
8 | if [ "x$D" != "x" ]; then | 6 | if [ "x$D" != "x" ]; then |
9 | exit 1 | 7 | if [ ! -f $INTERCEPT_DIR/update_icon_cache ]; then |
8 | cat << "EOF" > $INTERCEPT_DIR/update_icon_cache | ||
9 | #!/bin/sh | ||
10 | |||
11 | # update native pixbuf loaders | ||
12 | gdk-pixbuf-query-loaders --update-cache | ||
13 | |||
14 | for icondir in $D/usr/share/icons/*/ ; do | ||
15 | gtk-update-icon-cache -fqt $icondir | ||
16 | done | ||
17 | EOF | ||
18 | fi | ||
19 | exit 0 | ||
10 | fi | 20 | fi |
11 | 21 | ||
12 | # Update the pixbuf loaders in case they haven't been registered yet | 22 | # Update the pixbuf loaders in case they haven't been registered yet |