diff options
-rw-r--r-- | meta/classes/gtk-icon-cache.bbclass | 47 |
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 | ||
3 | DEPENDS += "${@['hicolor-icon-theme', '']['${BPN}' == 'hicolor-icon-theme']} gtk-update-icon-cache-native" | 3 | DEPENDS += "${@['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 | # | ||
10 | gtk_icon_cache_postinst() { | 5 | gtk_icon_cache_postinst() { |
11 | if [ "x$D" != "x" ]; then | 6 | if [ "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 | 9 | else |
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 | ||
15 | fi | 19 | fi |
16 | |||
17 | # Update the pixbuf loaders in case they haven't been registered yet | ||
18 | GDK_PIXBUF_MODULEDIR=${libdir}/gdk-pixbuf-2.0/2.10.0/loaders gdk-pixbuf-query-loaders --update-cache | ||
19 | |||
20 | for icondir in /usr/share/icons/* ; do | ||
21 | if [ -d $icondir ] ; then | ||
22 | gtk-update-icon-cache -fqt $icondir | ||
23 | fi | ||
24 | done | ||
25 | } | 20 | } |
26 | 21 | ||
27 | gtk_icon_cache_postrm() { | 22 | gtk_icon_cache_postrm() { |
28 | if [ "x$D" != "x" ]; then | 23 | if [ "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 | 26 | else | |
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 | ||
33 | fi | 32 | fi |
34 | |||
35 | for icondir in /usr/share/icons/* ; do | ||
36 | if [ -d $icondir ] ; then | ||
37 | gtk-update-icon-cache -qt $icondir | ||
38 | fi | ||
39 | done | ||
40 | } | 33 | } |
41 | 34 | ||
42 | python populate_packages_append () { | 35 | python populate_packages_append () { |