summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurentiu Palcu <laurentiu.palcu@intel.com>2013-04-22 11:01:23 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-04-22 14:45:02 +0100
commit6304ba31d5a2d6b1b8f5daaba619f979375f4604 (patch)
treede55bae76d207cbfdd8ee3ec41b11e62b58ef5ff
parent9e729f1f18867f7ce0fe253711031fa69078abe0 (diff)
downloadpoky-6304ba31d5a2d6b1b8f5daaba619f979375f4604.tar.gz
gtk-icon-cache.bbclass: do not exit 1 after installing intercept hook
This will allow to register, in a single postinstall, multiple hooks. (From OE-Core rev: 2cd244d6c93ec6d39e2649de64575c365bd4238d) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/gtk-icon-cache.bbclass47
1 files changed, 20 insertions, 27 deletions
diff --git a/meta/classes/gtk-icon-cache.bbclass b/meta/classes/gtk-icon-cache.bbclass
index b53c0bc1ca..7f24d49ec8 100644
--- a/meta/classes/gtk-icon-cache.bbclass
+++ b/meta/classes/gtk-icon-cache.bbclass
@@ -2,41 +2,34 @@ FILES_${PN} += "${datadir}/icons/hicolor"
2 2
3DEPENDS += "${@['hicolor-icon-theme', '']['${BPN}' == 'hicolor-icon-theme']} gtk-update-icon-cache-native" 3DEPENDS += "${@['hicolor-icon-theme', '']['${BPN}' == 'hicolor-icon-theme']} gtk-update-icon-cache-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#
10gtk_icon_cache_postinst() { 5gtk_icon_cache_postinst() {
11if [ "x$D" != "x" ]; then 6if [ "x$D" != "x" ]; then
12 $INTERCEPT_DIR/postinst_intercept update_icon_cache ${PKG} libdir=${libdir} \ 7 $INTERCEPT_DIR/postinst_intercept update_icon_cache ${PKG} libdir=${libdir} \
13 base_libdir=${base_libdir} 8 base_libdir=${base_libdir}
14 exit 1 9else
10
11 # Update the pixbuf loaders in case they haven't been registered yet
12 GDK_PIXBUF_MODULEDIR=${libdir}/gdk-pixbuf-2.0/2.10.0/loaders gdk-pixbuf-query-loaders --update-cache
13
14 for icondir in /usr/share/icons/* ; do
15 if [ -d $icondir ] ; then
16 gtk-update-icon-cache -fqt $icondir
17 fi
18 done
15fi 19fi
16
17# Update the pixbuf loaders in case they haven't been registered yet
18GDK_PIXBUF_MODULEDIR=${libdir}/gdk-pixbuf-2.0/2.10.0/loaders gdk-pixbuf-query-loaders --update-cache
19
20for icondir in /usr/share/icons/* ; do
21 if [ -d $icondir ] ; then
22 gtk-update-icon-cache -fqt $icondir
23 fi
24done
25} 20}
26 21
27gtk_icon_cache_postrm() { 22gtk_icon_cache_postrm() {
28if [ "x$D" != "x" ]; then 23if [ "x$D" != "x" ]; then
29 $INTERCEPT_DIR/postinst_intercept update_icon_cache ${PKG} libdir=${libdir} \ 24 $INTERCEPT_DIR/postinst_intercept update_icon_cache ${PKG} libdir=${libdir} \
30 base_libdir=${base_libdir} 25 base_libdir=${base_libdir}
31 26else
32 exit 1 27 for icondir in /usr/share/icons/* ; do
28 if [ -d $icondir ] ; then
29 gtk-update-icon-cache -qt $icondir
30 fi
31 done
33fi 32fi
34
35for icondir in /usr/share/icons/* ; do
36 if [ -d $icondir ] ; then
37 gtk-update-icon-cache -qt $icondir
38 fi
39done
40} 33}
41 34
42python populate_packages_append () { 35python populate_packages_append () {