All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Jansa <martin.jansa@gmail.com>
To: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH] pango: Fix postinst
Date: Thu, 27 Feb 2014 23:15:01 +0100	[thread overview]
Message-ID: <20140227221501.GE26981@jama> (raw)
In-Reply-To: <1393532438-20847-1-git-send-email-Martin.Jansa@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2754 bytes --]

On Thu, Feb 27, 2014 at 09:20:38PM +0100, Martin Jansa wrote:
> * 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)

Something is wrong, in theory the
if [ "x$D" != "x" ]; then
case should always exit with 0 or 1 before it reaches the call added by
do_split_packages so it has to be qemu_run_binary call failing and
causing exit 1

> 
> 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
> 

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

  parent reply	other threads:[~2014-02-27 22:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140227221501.GE26981@jama \
    --to=martin.jansa@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.