summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/gtk-icon-cache.bbclass39
1 files changed, 9 insertions, 30 deletions
diff --git a/meta/classes/gtk-icon-cache.bbclass b/meta/classes/gtk-icon-cache.bbclass
index cf33efd5a6..2ca99acdf9 100644
--- a/meta/classes/gtk-icon-cache.bbclass
+++ b/meta/classes/gtk-icon-cache.bbclass
@@ -2,23 +2,15 @@ FILES_${PN} += "${datadir}/icons/hicolor"
2 2
3DEPENDS += "${@['hicolor-icon-theme', '']['${BPN}' == 'hicolor-icon-theme']} gtk+-native" 3DEPENDS += "${@['hicolor-icon-theme', '']['${BPN}' == 'hicolor-icon-theme']} gtk+-native"
4 4
5#
6# On host, the postinstall MUST return 1 because we do not know if the intercept
7# hook will succeed. If it does succeed, than the packages will be marked as
8# installed.
9#
5gtk_icon_cache_postinst() { 10gtk_icon_cache_postinst() {
6if [ "x$D" != "x" ]; then 11if [ "x$D" != "x" ]; then
7 if [ ! -f $INTERCEPT_DIR/update_icon_cache ]; then 12 $INTERCEPT_DIR/postinst_intercept update_icon_cache ${PKG}
8 cat << "EOF" > $INTERCEPT_DIR/update_icon_cache 13 exit 1
9#!/bin/sh
10
11# update native pixbuf loaders
12gdk-pixbuf-query-loaders --update-cache
13
14for icondir in $D/usr/share/icons/*/ ; do
15 if [ -d $icondir ] ; then
16 gtk-update-icon-cache -fqt $icondir
17 fi
18done
19EOF
20 fi
21 exit 0
22fi 14fi
23 15
24# Update the pixbuf loaders in case they haven't been registered yet 16# Update the pixbuf loaders in case they haven't been registered yet
@@ -33,21 +25,8 @@ done
33 25
34gtk_icon_cache_postrm() { 26gtk_icon_cache_postrm() {
35if [ "x$D" != "x" ]; then 27if [ "x$D" != "x" ]; then
36 if [ ! -f $INTERCEPT_DIR/update_icon_cache ]; then 28 $INTERCEPT_DIR/postinst_intercept update_icon_cache ${PKG}
37 cat << "EOF" > $INTERCEPT_DIR/update_icon_cache 29 exit 1
38#!/bin/sh
39
40# update native pixbuf loaders
41gdk-pixbuf-query-loaders --update-cache
42
43for icondir in $D/usr/share/icons/*/ ; do
44 if [ -d $icondir ] ; then
45 gtk-update-icon-cache -fqt $icondir
46 fi
47done
48EOF
49 fi
50 exit 0
51fi 30fi
52 31
53for icondir in /usr/share/icons/* ; do 32for icondir in /usr/share/icons/* ; do