Skip to contentSkip to conversation

pixbufcache: add error exit in pixbufcache_sstate_postinst

PATCH In review Joe Slater 2 participants 2 messages Apr 22, 2014 – Apr 23, 2014

lore
Share & tools
lore

Joe Slater

author
#0 lore raw

PATCH v2 1/1 pixbufcache: add error exit in pixbufcache_sstate_postinst

In order to attempt recovery of a failed populate_sysroot_setscene, we need to explicitly error exit an SSTATEPOSTINSTFUNC. So, we test the return value of gdk-pixbuf-query-loaders.

---
 meta/classes/pixbufcache.bbclass |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
meta/classes/pixbufcache.bbclass +4 -2
index 922174d..b8d75bd 100644
@@ -46,14 +46,16 @@ python populate_packages_append() {
 }
 
 #
-# Add a sstate postinst hook to update the cache for native packages
+# Add an sstate postinst hook to update the cache for native packages.
+# An error exit during populate_sysroot_setscene allows bitbake to
+# try to recover by re-building the package.
 #
 SSTATEPOSTINSTFUNCS_append_class-native = " pixbufcache_sstate_postinst"
 
 pixbufcache_sstate_postinst() {
 	if [ "${BB_CURRENTTASK}" = "populate_sysroot" -o "${BB_CURRENTTASK}" = "populate_sysroot_setscene" ]
 	then
-		GDK_PIXBUF_FATAL_LOADER=1 gdk-pixbuf-query-loaders --update-cache
+		GDK_PIXBUF_FATAL_LOADER=1 gdk-pixbuf-query-loaders --update-cache || exit 1
 	fi
 }
 
Signature · 1 line
1.7.3.4
Acked-by on v2 1/1
#1 lore raw
Quoted 40 lines · Joe Slater

In order to attempt recovery of a failed populate_sysroot_setscene, we need to explicitly error exit an SSTATEPOSTINSTFUNC. So, we test the return value of gdk-pixbuf-query-loaders.

---
 meta/classes/pixbufcache.bbclass |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
meta/classes/pixbufcache.bbclass +4 -3
index 922174d..b8d75bd 100644
@@ -46,14 +46,16 @@ python populate_packages_append() {
 }
 
 #
-# Add a sstate postinst hook to update the cache for native packages
+# Add an sstate postinst hook to update the cache for native packages.
+# An error exit during populate_sysroot_setscene allows bitbake to
+# try to recover by re-building the package.
 #
 SSTATEPOSTINSTFUNCS_append_class-native = " pixbufcache_sstate_postinst"
 
 pixbufcache_sstate_postinst() {
        if [ "${BB_CURRENTTASK}" = "populate_sysroot" -o "${BB_CURRENTTASK}" = "populate_sysroot_setscene" ]
        then
-               GDK_PIXBUF_FATAL_LOADER=1 gdk-pixbuf-query-loaders --update-cache
+               GDK_PIXBUF_FATAL_LOADER=1 gdk-pixbuf-query-loaders --update-cache || exit 1
        fi
 }
 
--

1.7.3.4

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core