Skip to contentSkip to conversation

pixbufcache.bbclass: Fix setscene silent failures

PATCH New Richard Purdie 1 participant 1 message Mar 31, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pixbufcache.bbclass: Fix setscene silent failures

Unfortunately gdk-pixbuf-query-loaders can issue errors but still return success. We therefore check for output and error in the case any output is issued (normal success does not issue any).

---
Ross: I'm open to better patches ;-)
[I wrote this to debug other problems]

meta/classes/pixbufcache.bbclass +5 -1
index 414fd30..88da734 100644
@@ -53,7 +53,11 @@ SSTATEPOSTINSTFUNCS_append_class-native = " pixbufcache_sstate_postinst"
 pixbufcache_sstate_postinst() {
 	if [ "${BB_CURRENTTASK}" = "populate_sysroot" -o "${BB_CURRENTTASK}" = "populate_sysroot_setscene" ]
 	then
-		gdk-pixbuf-query-loaders --update-cache
+		T=`gdk-pixbuf-query-loaders --update-cache 2>&1`
+		if [ -n "$T" ]; then 
+			echo $T
+			exit 1
+		fi
 	fi
 }