summaryrefslogtreecommitdiffstats
path: root/meta/classes/gtk-icon-cache.bbclass
diff options
context:
space:
mode:
authorLaurentiu Palcu <laurentiu.palcu@intel.com>2013-02-12 18:12:39 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-02-13 16:52:29 +0000
commitceabaf626538ccdbd06ec4e8d87024216a064f52 (patch)
treec9570cd04d2a96cbe4923833a7dccd808428e327 /meta/classes/gtk-icon-cache.bbclass
parent5bb362a0ba97687029b3aef76b7e789570a4d728 (diff)
downloadpoky-ceabaf626538ccdbd06ec4e8d87024216a064f52.tar.gz
gtk-icon-cache.bbclass: use postinst_intercept script
Since the hook has been made a standalone script, use postinst_intercept script in order to "link" the package to the hook. (From OE-Core rev: d7ddae84165b5b84dc6ac640fd492ade891ddd4e) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@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.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