diff options
author | Laurentiu Palcu <laurentiu.palcu@intel.com> | 2013-04-22 11:01:23 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-04-22 14:36:25 +0100 |
commit | 2cd244d6c93ec6d39e2649de64575c365bd4238d (patch) | |
tree | 55f2c25072ce824a9b73a9f2edafdfaf26ca8da1 | |
parent | 9553874cf02ba443aff1bbead56bacfcda9bb6ca (diff) | |
download | openembedded-core-2cd244d6c93ec6d39e2649de64575c365bd4238d.tar.gz openembedded-core-2cd244d6c93ec6d39e2649de64575c365bd4238d.tar.bz2 openembedded-core-2cd244d6c93ec6d39e2649de64575c365bd4238d.zip |
gtk-icon-cache.bbclass: do not exit 1 after installing intercept hook
This will allow to register, in a single postinstall, multiple hooks.
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.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" DEPENDS += "${@['hicolor-icon-theme', '']['${BPN}' == 'hicolor-icon-theme']} gtk-update-icon-cache-native" -# -# On host, the postinstall MUST return 1 because we do not know if the intercept -# hook will succeed. If it does succeed, than the packages will be marked as -# installed. -# gtk_icon_cache_postinst() { if [ "x$D" != "x" ]; then - $INTERCEPT_DIR/postinst_intercept update_icon_cache ${PKG} libdir=${libdir} \ - base_libdir=${base_libdir} - exit 1 + $INTERCEPT_DIR/postinst_intercept update_icon_cache ${PKG} libdir=${libdir} \ + base_libdir=${base_libdir} +else + + # Update the pixbuf loaders in case they haven't been registered yet + GDK_PIXBUF_MODULEDIR=${libdir}/gdk-pixbuf-2.0/2.10.0/loaders gdk-pixbuf-query-loaders --update-cache + + for icondir in /usr/share/icons/* ; do + if [ -d $icondir ] ; then + gtk-update-icon-cache -fqt $icondir + fi + done fi - -# Update the pixbuf loaders in case they haven't been registered yet -GDK_PIXBUF_MODULEDIR=${libdir}/gdk-pixbuf-2.0/2.10.0/loaders gdk-pixbuf-query-loaders --update-cache - -for icondir in /usr/share/icons/* ; do - if [ -d $icondir ] ; then - gtk-update-icon-cache -fqt $icondir - fi -done } gtk_icon_cache_postrm() { if [ "x$D" != "x" ]; then - $INTERCEPT_DIR/postinst_intercept update_icon_cache ${PKG} libdir=${libdir} \ - base_libdir=${base_libdir} - - exit 1 + $INTERCEPT_DIR/postinst_intercept update_icon_cache ${PKG} libdir=${libdir} \ + base_libdir=${base_libdir} +else + for icondir in /usr/share/icons/* ; do + if [ -d $icondir ] ; then + gtk-update-icon-cache -qt $icondir + fi + done fi - -for icondir in /usr/share/icons/* ; do - if [ -d $icondir ] ; then - gtk-update-icon-cache -qt $icondir - fi -done } python populate_packages_append () { |