All of lore.kernel.org
 help / color / mirror / Atom feed
From: Saul Wold <sgw@linux.intel.com>
To: Martin Jansa <martin.jansa@gmail.com>,
	 openembedded-core@lists.openembedded.org
Subject: Re: [PATCH] pango: Fix postinst
Date: Thu, 27 Feb 2014 23:24:42 +0200	[thread overview]
Message-ID: <530FAD1A.1060509@linux.intel.com> (raw)
In-Reply-To: <1393532438-20847-1-git-send-email-Martin.Jansa@gmail.com>

On 02/27/2014 10:20 PM, 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)
>
> 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
>
Are you missing a 'fi' here?

I got an error during parsing:
> ERROR: ExpansionError during parsing /home/sgw/yocto/poky/meta/recipes-graphics/pango/pango_1.36.2.bb: Failure expanding variable pango_postinst: ShellSyntaxError: None
> followed by:
>


Sau!

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


  reply	other threads:[~2014-02-27 21:24 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 [this message]
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

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=530FAD1A.1060509@linux.intel.com \
    --to=sgw@linux.intel.com \
    --cc=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.