summaryrefslogtreecommitdiff
path: root/meta/recipes-gnome/gdk-pixbuf
diff options
context:
space:
mode:
authorLaurentiu Palcu <laurentiu.palcu@intel.com>2012-12-10 16:31:21 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-12-13 14:28:40 +0000
commit901fbfac48918db7bf809ded3df533504141c5ca (patch)
tree6f2f5df9d60b1fb1306df17da9d433dc984a317e /meta/recipes-gnome/gdk-pixbuf
parent06151c34f4f4cb669b2f93ebb2f78cfecf698355 (diff)
downloadopenembedded-core-901fbfac48918db7bf809ded3df533504141c5ca.tar.gz
openembedded-core-901fbfac48918db7bf809ded3df533504141c5ca.tar.bz2
openembedded-core-901fbfac48918db7bf809ded3df533504141c5ca.zip
gdk-pixbuf: handle postinstall errors differently
Apparently gdk-pixbuf-query-loaders always returns 0 but writes any errors to stderr. So, the conditional exit at the end of the command was useless. Write the errors to a file and exit only if the file size is greater than 0. Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta/recipes-gnome/gdk-pixbuf')
-rw-r--r--meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.24.1.bb20
1 files changed, 17 insertions, 3 deletions
diff --git a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.24.1.bb b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.24.1.bb
index 2377d0eec1..33a43becaa 100644
--- a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.24.1.bb
+++ b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.24.1.bb
@@ -63,12 +63,26 @@ if [ "x$D" != "x" ]; then
# we trick the gdk-pixbuf-query-loaders into scanning the native shared
# objects and then we remove the NATIVE_ROOT prefix from the paths in
# loaders.cache.
-gdk-pixbuf-query-loaders $(find $D/${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders \
- -name *.so | sed -e "s:$D:$NATIVE_ROOT:g") > \
- $D/${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders.cache || exit 1
+gdk-pixbuf-query-loaders $(ls -d -1 $D/${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders/*.so |\
+ sed -e "s:$D:$NATIVE_ROOT:g") > \
+ $D/${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders.cache \
+ 2>$D/${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders.err
+
+# gdk-pixbuf-query-loaders always returns 0, so we need to check if loaders.err
+# has anything in it
+if [ -s $D/${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders.err ]; then
+ echo "${PN} postinstall scriptlet failed:"
+ cat $D/${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders.err
+ rm $D/${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders.err
+ # we've got errors, postpone postinstall for first boot
+ exit 1
+fi
sed -i -e "s:$NATIVE_ROOT:/:g" $D/${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders.cache
+# remove the empty loaders.err
+rm $D/${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders.err
+
exit 0
fi