* [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
* Re: [PATCH] pango: Fix postinst
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
1 sibling, 0 replies; 6+ messages in thread
From: Saul Wold @ 2014-02-27 21:24 UTC (permalink / raw)
To: Martin Jansa, openembedded-core
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}"
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] pango: Fix postinst
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
1 sibling, 1 reply; 6+ messages in thread
From: Martin Jansa @ 2014-02-27 22:15 UTC (permalink / raw)
To: openembedded-core
[-- 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 --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] pango: Fix postinst
2014-02-27 22:15 ` Martin Jansa
@ 2014-02-27 22:17 ` Richard Purdie
2014-02-27 23:31 ` Martin Jansa
0 siblings, 1 reply; 6+ messages in thread
From: Richard Purdie @ 2014-02-27 22:17 UTC (permalink / raw)
To: Martin Jansa; +Cc: openembedded-core
On Thu, 2014-02-27 at 23:15 +0100, Martin Jansa wrote:
> 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
Saul's error shows the shell parser in bitbake exiting. The function in
question isn't getting run, its never getting past the parsing stage. As
Saul mentions, it appears the if/fi balance isn't correct which would
upset the shell parser...
Cheers,
Richard
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] pango: Fix postinst
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
0 siblings, 1 reply; 6+ messages in thread
From: Martin Jansa @ 2014-02-27 23:31 UTC (permalink / raw)
To: Richard Purdie; +Cc: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 1929 bytes --]
On Thu, Feb 27, 2014 at 10:17:53PM +0000, Richard Purdie wrote:
> On Thu, 2014-02-27 at 23:15 +0100, Martin Jansa wrote:
> > 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
>
> Saul's error shows the shell parser in bitbake exiting. The function in
> question isn't getting run, its never getting past the parsing stage. As
> Saul mentions, it appears the if/fi balance isn't correct which would
> upset the shell parser...
Saul is correct, this version was wrong.. I had fixed version locally,
but than I've noticed that the exit calls should prevent the added
pango-querymodules call to be executed in do_rootfs, so I have started
checking what could be wrong and forgot to update status of this patch
on e-mail (or send v2 with fixed parsing) now I'm testing if the failure
is just because of missing qemu-native dependency.
meta/classes/qemu.bbclass doesn't add the dependency on qemu-native and
in image without any package which would be built with
meta/classes/fontcache.bbclass:DEPENDS += "qemu-native"
meta/classes/pixbufcache.bbclass:DEPENDS += "qemu-native"
it's IMHO still possible to end with do_rootfs being executed without
qemu-native being pulled into the build.
So v2 will came later after more testing.
--
Martin 'JaMa' Jansa jabber: Martin.Jansa@gmail.com
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] pango: Fix postinst by adding missing qemu-native dependency
2014-02-27 23:31 ` Martin Jansa
@ 2014-03-01 20:52 ` Martin Jansa
0 siblings, 0 replies; 6+ messages in thread
From: Martin Jansa @ 2014-03-01 20:52 UTC (permalink / raw)
To: openembedded-core
* postinst_prologue calls qemu_run_binary but there is no
dependency on qemu-native which causes postinst to sometimes
fail which is fatal for building read-only rootfs
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
meta/recipes-graphics/pango/pango.inc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/recipes-graphics/pango/pango.inc b/meta/recipes-graphics/pango/pango.inc
index 17006d3..4a20d20 100644
--- a/meta/recipes-graphics/pango/pango.inc
+++ b/meta/recipes-graphics/pango/pango.inc
@@ -10,7 +10,7 @@ SECTION = "libs"
LICENSE = "LGPLv2.0+"
X11DEPENDS = "virtual/libx11 libxft"
-DEPENDS = "glib-2.0 fontconfig freetype zlib virtual/libiconv cairo harfbuzz"
+DEPENDS = "glib-2.0 fontconfig freetype zlib virtual/libiconv cairo harfbuzz qemu-native"
PACKAGECONFIG ??= "${@base_contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
PACKAGECONFIG[x11] = "--with-xft,--without-xft,${X11DEPENDS}"
--
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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox