All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pango: Fix postinst
@ 2014-02-27 20:20 Martin Jansa
  2014-02-27 21:24 ` Saul Wold
  2014-02-27 22:15 ` Martin Jansa
  0 siblings, 2 replies; 6+ messages in thread
From: Martin Jansa @ 2014-02-27 20:20 UTC (permalink / raw)
  To: openembedded-core

* do_split_packages was appending call to
  ${bindir}/${MLPREFIX}pango-querymodules
  without $D prefix or test if $D is empty, so it was always
  failing on buildhostis without pango-querymodules and such
  failure is fatal when rootfs is read-only (do_rootfs fails
  because some packages weren't configured)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 meta/recipes-graphics/pango/pango.inc | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/meta/recipes-graphics/pango/pango.inc b/meta/recipes-graphics/pango/pango.inc
index 17006d3..5fddff9 100644
--- a/meta/recipes-graphics/pango/pango.inc
+++ b/meta/recipes-graphics/pango/pango.inc
@@ -42,21 +42,25 @@ EXTRA_OECONF = "--disable-introspection \
 LEAD_SONAME = "libpango-1.0*"
 LIBV = "1.8.0"
 
-postinst_prologue() {
+pango_postinst() {
 if ! [ -e $D${sysconfdir}/pango ] ; then
 	mkdir -p $D${sysconfdir}/pango
 fi
 
-if [ "x$D" != "x" ]; then
+if [ -n "$D" ]; then
 	${@qemu_run_binary(d, '$D','${bindir}/${MLPREFIX}pango-querymodules')} \
 		$D${libdir}/pango/${LIBV}/modules/*.so \
 		> $D${sysconfdir}/pango/${MLPREFIX}pango.modules 2>/dev/null
 
-	[ $? -ne 0 ] && exit 1
+	if [ $? -ne 0 ] ; then
+		echo "qemu_run_binary call ${bindir}/${MLPREFIX}pango-querymodules $D${libdir}/pango/${LIBV}/modules/*.so > $D${sysconfdir}/pango/${MLPREFIX}pango.modules failed"
+		exit 1
 
 	sed -i -e "s:$D::" $D${sysconfdir}/pango/${MLPREFIX}pango.modules
 
 	exit 0
+else
+	${bindir}/${MLPREFIX}pango-querymodules > /etc/pango/${MLPREFIX}pango.modules
 fi
 }
 
@@ -68,11 +72,11 @@ do_install_append () {
 
 
 python populate_packages_prepend () {
-    prologue = d.getVar("postinst_prologue", True)
+    pango_postinst = d.getVar("pango_postinst", True)
 
     modules_root = d.expand('${libdir}/pango/${LIBV}/modules')
 
-    do_split_packages(d, modules_root, '^pango-(.*)\.so$', 'pango-module-%s', 'Pango module %s', prologue + '${bindir}/${MLPREFIX}pango-querymodules > /etc/pango/${MLPREFIX}pango.modules')
+    do_split_packages(d, modules_root, '^pango-(.*)\.so$', 'pango-module-%s', 'Pango module %s', pango_postinst)
 }
 
 FILES_${PN} = "${sysconfdir}/pango/* ${bindir}/* ${libdir}/libpango*${SOLIBS}"
-- 
1.9.0



^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-03-01 20:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-27 20:20 [PATCH] pango: Fix postinst Martin Jansa
2014-02-27 21:24 ` Saul Wold
2014-02-27 22:15 ` Martin Jansa
2014-02-27 22:17   ` Richard Purdie
2014-02-27 23:31     ` Martin Jansa
2014-03-01 20:52       ` [PATCH] pango: Fix postinst by adding missing qemu-native dependency Martin Jansa

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.