Patchwork [3/4] pixbufcache.bbclass: do not exit 1 after installing intercept hook

login
register
mail settings
Submitter Laurentiu Palcu
Date April 22, 2013, 8:01 a.m.
Message ID <7acadd6ee79215d01ec746ac48f98fab71a89b33.1366615922.git.laurentiu.palcu@intel.com>
Download mbox | patch
Permalink /patch/48607/
State Accepted
Commit 5e702edaa4306ba8630d2f06a6672abd24153dc8
Headers show

Comments

Laurentiu Palcu - April 22, 2013, 8:01 a.m.
This will allow to register, in a single postinstall, multiple hooks.

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
---
 meta/classes/pixbufcache.bbclass |   29 ++++++++++++-----------------
 1 file changed, 12 insertions(+), 17 deletions(-)

Patch

diff --git a/meta/classes/pixbufcache.bbclass b/meta/classes/pixbufcache.bbclass
index 3c34557..4e0f577 100644
--- a/meta/classes/pixbufcache.bbclass
+++ b/meta/classes/pixbufcache.bbclass
@@ -8,27 +8,22 @@  inherit qemu
 
 PIXBUF_PACKAGES ??= "${PN}"
 
-#
-# 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.
-#
 pixbufcache_common() {
 if [ "x$D" != "x" ]; then
 	$INTERCEPT_DIR/postinst_intercept update_pixbuf_cache ${PKG} libdir=${libdir} \
 		bindir=${bindir} base_libdir=${base_libdir}
-	exit 1
-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
-
-if [ -x ${bindir}/gtk-update-icon-cache ] && [ -d ${datadir}/icons ]; then
-    for icondir in /usr/share/icons/*; do
-        if [ -d ${icondir} ]; then
-            gtk-update-icon-cache -t -q ${icondir}
-        fi
-    done
+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
+
+	if [ -x ${bindir}/gtk-update-icon-cache ] && [ -d ${datadir}/icons ]; then
+		for icondir in /usr/share/icons/*; do
+			if [ -d ${icondir} ]; then
+				gtk-update-icon-cache -t -q ${icondir}
+			fi
+		done
+	fi
 fi
 }