summaryrefslogtreecommitdiffstats
path: root/meta
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 15:18:44 +0000
commit07dd59d8126466bc38a0950ce95859cacd0c9d9d (patch)
treefd2d751994231c263f72c82f7a703d6e23c7a5d9 /meta
parent0496ba3a9b0120eefefbc6e5f8390436f1ccb2c3 (diff)
downloadpoky-07dd59d8126466bc38a0950ce95859cacd0c9d9d.tar.gz
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. (From OE-Core rev: 901fbfac48918db7bf809ded3df533504141c5ca) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-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
63# we trick the gdk-pixbuf-query-loaders into scanning the native shared 63# we trick the gdk-pixbuf-query-loaders into scanning the native shared
64# objects and then we remove the NATIVE_ROOT prefix from the paths in 64# objects and then we remove the NATIVE_ROOT prefix from the paths in
65# loaders.cache. 65# loaders.cache.
66gdk-pixbuf-query-loaders $(find $D/${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders \ 66gdk-pixbuf-query-loaders $(ls -d -1 $D/${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders/*.so |\
67 -name *.so | sed -e "s:$D:$NATIVE_ROOT:g") > \ 67 sed -e "s:$D:$NATIVE_ROOT:g") > \
68 $D/${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders.cache || exit 1 68 $D/${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders.cache \
69 2>$D/${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders.err
70
71# gdk-pixbuf-query-loaders always returns 0, so we need to check if loaders.err
72# has anything in it
73if [ -s $D/${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders.err ]; then
74 echo "${PN} postinstall scriptlet failed:"
75 cat $D/${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders.err
76 rm $D/${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders.err
77 # we've got errors, postpone postinstall for first boot
78 exit 1
79fi
69 80
70sed -i -e "s:$NATIVE_ROOT:/:g" $D/${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders.cache 81sed -i -e "s:$NATIVE_ROOT:/:g" $D/${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders.cache
71 82
83# remove the empty loaders.err
84rm $D/${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders.err
85
72exit 0 86exit 0
73fi 87fi
74 88