All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] gdk-pixbuf: Avoid rebuild failures
@ 2015-09-23 22:32 Richard Purdie
  2015-09-23 22:54 ` Gary Thomas
  2015-09-24 11:27 ` Otavio Salvador
  0 siblings, 2 replies; 6+ messages in thread
From: Richard Purdie @ 2015-09-23 22:32 UTC (permalink / raw)
  To: openembedded-core

If gdkpixbuf-native rebuilds and there are stale (broken) modules lying around,
it can fail to run the postinst. E.g. svg links to harfbuzz and if harfbuzz is
removed from the sysroot but the svg loader isn't, we get a symbol linking issue.

The reproducer is along the lines of build gdk-pixbuf-native along
with harfbuzz-native and librsvg-native, then make a small change to the
gdk-pixbuf recipe that would cause it to rebuild, clean harfbuzz-native
and then build gdk-pixbuf.

To fix this, when we install gdk-pixbuf, we wipe out any previous loaders.
The idea is that gdk would always come first and anything else installing
itself will come later and rerun the postinst if needed. We can therefore
just remove any other loaders.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

diff --git a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.30.8.bb b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.30.8.bb
index bdf173a..35bb192 100644
--- a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.30.8.bb
+++ b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.30.8.bb
@@ -94,3 +94,12 @@ do_install_append_class-native() {
 		GDK_PIXBUF_MODULEDIR=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders
 }
 BBCLASSEXTEND = "native"
+
+SSTATEPREINSTFUNCS_append_class-native = " gdkpixbuf_sstate_preinst"
+SYSROOT_PREPROCESS_FUNCS_append_class-native = " gdkpixbuf_sstate_preinst"
+
+gdkpixbuf_sstate_preinst() {
+	if [ "${BB_CURRENTTASK}" = "populate_sysroot" -o "${BB_CURRENTTASK}" = "populate_sysroot_setscene" ]; then
+		rm -rf ${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/*
+	fi
+}




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

* Re: [PATCH] gdk-pixbuf: Avoid rebuild failures
  2015-09-23 22:32 [PATCH] gdk-pixbuf: Avoid rebuild failures Richard Purdie
@ 2015-09-23 22:54 ` Gary Thomas
  2015-09-24  6:35   ` Richard Purdie
  2015-09-24 11:27 ` Otavio Salvador
  1 sibling, 1 reply; 6+ messages in thread
From: Gary Thomas @ 2015-09-23 22:54 UTC (permalink / raw)
  To: openembedded-core

On 2015-09-23 16:32, Richard Purdie wrote:
> If gdkpixbuf-native rebuilds and there are stale (broken) modules lying around,
> it can fail to run the postinst. E.g. svg links to harfbuzz and if harfbuzz is
> removed from the sysroot but the svg loader isn't, we get a symbol linking issue.
>
> The reproducer is along the lines of build gdk-pixbuf-native along
> with harfbuzz-native and librsvg-native, then make a small change to the
> gdk-pixbuf recipe that would cause it to rebuild, clean harfbuzz-native
> and then build gdk-pixbuf.
>
> To fix this, when we install gdk-pixbuf, we wipe out any previous loaders.
> The idea is that gdk would always come first and anything else installing
> itself will come later and rerun the postinst if needed. We can therefore
> just remove any other loaders.

Does the analogue of this problem exist for the non-native packages?  I've
not seen it, but it seems that it might based on your analysis.

>
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
>
> diff --git a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.30.8.bb b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.30.8.bb
> index bdf173a..35bb192 100644
> --- a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.30.8.bb
> +++ b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.30.8.bb
> @@ -94,3 +94,12 @@ do_install_append_class-native() {
>   		GDK_PIXBUF_MODULEDIR=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders
>   }
>   BBCLASSEXTEND = "native"
> +
> +SSTATEPREINSTFUNCS_append_class-native = " gdkpixbuf_sstate_preinst"
> +SYSROOT_PREPROCESS_FUNCS_append_class-native = " gdkpixbuf_sstate_preinst"
> +
> +gdkpixbuf_sstate_preinst() {
> +	if [ "${BB_CURRENTTASK}" = "populate_sysroot" -o "${BB_CURRENTTASK}" = "populate_sysroot_setscene" ]; then
> +		rm -rf ${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/*
> +	fi
> +}
>
>

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------


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

* Re: [PATCH] gdk-pixbuf: Avoid rebuild failures
  2015-09-23 22:54 ` Gary Thomas
@ 2015-09-24  6:35   ` Richard Purdie
  0 siblings, 0 replies; 6+ messages in thread
From: Richard Purdie @ 2015-09-24  6:35 UTC (permalink / raw)
  To: Gary Thomas; +Cc: openembedded-core

On Wed, 2015-09-23 at 16:54 -0600, Gary Thomas wrote:
> On 2015-09-23 16:32, Richard Purdie wrote:
> > If gdkpixbuf-native rebuilds and there are stale (broken) modules lying around,
> > it can fail to run the postinst. E.g. svg links to harfbuzz and if harfbuzz is
> > removed from the sysroot but the svg loader isn't, we get a symbol linking issue.
> >
> > The reproducer is along the lines of build gdk-pixbuf-native along
> > with harfbuzz-native and librsvg-native, then make a small change to the
> > gdk-pixbuf recipe that would cause it to rebuild, clean harfbuzz-native
> > and then build gdk-pixbuf.
> >
> > To fix this, when we install gdk-pixbuf, we wipe out any previous loaders.
> > The idea is that gdk would always come first and anything else installing
> > itself will come later and rerun the postinst if needed. We can therefore
> > just remove any other loaders.
> 
> Does the analogue of this problem exist for the non-native packages?  I've
> not seen it, but it seems that it might based on your analysis.

No, since we only have the postinst to index the loaders in the native
case. In the target case we do that at rootfs time (or on target). So
this is a native only issue.

Cheers,

Richard



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

* Re: [PATCH] gdk-pixbuf: Avoid rebuild failures
  2015-09-23 22:32 [PATCH] gdk-pixbuf: Avoid rebuild failures Richard Purdie
  2015-09-23 22:54 ` Gary Thomas
@ 2015-09-24 11:27 ` Otavio Salvador
  2015-09-24 21:40   ` Richard Purdie
  1 sibling, 1 reply; 6+ messages in thread
From: Otavio Salvador @ 2015-09-24 11:27 UTC (permalink / raw)
  To: Richard Purdie; +Cc: openembedded-core

Hello Richard,

Thanks for hunting this bug, this was very annoying and hard to
figure. It does seem to address the issue in our builder.

On Wed, Sep 23, 2015 at 7:32 PM, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> If gdkpixbuf-native rebuilds and there are stale (broken) modules lying around,
> it can fail to run the postinst. E.g. svg links to harfbuzz and if harfbuzz is
> removed from the sysroot but the svg loader isn't, we get a symbol linking issue.
>
> The reproducer is along the lines of build gdk-pixbuf-native along
> with harfbuzz-native and librsvg-native, then make a small change to the
> gdk-pixbuf recipe that would cause it to rebuild, clean harfbuzz-native
> and then build gdk-pixbuf.
>
> To fix this, when we install gdk-pixbuf, we wipe out any previous loaders.
> The idea is that gdk would always come first and anything else installing
> itself will come later and rerun the postinst if needed. We can therefore
> just remove any other loaders.
>
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

Acked-by: Otavio Salvador <otavio@ossystems.com.br>

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


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

* Re: [PATCH] gdk-pixbuf: Avoid rebuild failures
  2015-09-24 11:27 ` Otavio Salvador
@ 2015-09-24 21:40   ` Richard Purdie
  2015-09-25 18:12     ` Otavio Salvador
  0 siblings, 1 reply; 6+ messages in thread
From: Richard Purdie @ 2015-09-24 21:40 UTC (permalink / raw)
  To: Otavio Salvador; +Cc: openembedded-core

On Thu, 2015-09-24 at 08:27 -0300, Otavio Salvador wrote:
> Hello Richard,
> 
> Thanks for hunting this bug, this was very annoying and hard to
> figure. It does seem to address the issue in our builder.

Sadly, whilst I merged it and it does fix that problem, I suspect this
causes:

https://autobuilder.yoctoproject.org/main/builders/nightly-x32/builds/497/steps/BuildImages/logs/stdio

:(

Cheers,

Richard



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

* Re: [PATCH] gdk-pixbuf: Avoid rebuild failures
  2015-09-24 21:40   ` Richard Purdie
@ 2015-09-25 18:12     ` Otavio Salvador
  0 siblings, 0 replies; 6+ messages in thread
From: Otavio Salvador @ 2015-09-25 18:12 UTC (permalink / raw)
  To: Richard Purdie; +Cc: openembedded-core

On Thu, Sep 24, 2015 at 6:40 PM, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> On Thu, 2015-09-24 at 08:27 -0300, Otavio Salvador wrote:
>> Thanks for hunting this bug, this was very annoying and hard to
>> figure. It does seem to address the issue in our builder.
>
> Sadly, whilst I merged it and it does fix that problem, I suspect this
> causes:
>
> https://autobuilder.yoctoproject.org/main/builders/nightly-x32/builds/497/steps/BuildImages/logs/stdio

It does seem to be related. But why it did not include the .so files
in the sysroot again when resolving the dependencies?

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


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

end of thread, other threads:[~2015-09-25 18:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-23 22:32 [PATCH] gdk-pixbuf: Avoid rebuild failures Richard Purdie
2015-09-23 22:54 ` Gary Thomas
2015-09-24  6:35   ` Richard Purdie
2015-09-24 11:27 ` Otavio Salvador
2015-09-24 21:40   ` Richard Purdie
2015-09-25 18:12     ` Otavio Salvador

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.