All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pixbufcache: Ensure that jpeg-native is available for postinst if necessary
@ 2015-06-13 18:44 Mike Crowe
  2015-06-13 18:46 ` Mike Crowe
  2015-06-23 15:12 ` Phil Blundell
  0 siblings, 2 replies; 7+ messages in thread
From: Mike Crowe @ 2015-06-13 18:44 UTC (permalink / raw)
  To: openembedded-core; +Cc: Mike Crowe

pixbufcache_sstate_postinst expects to be able to call
gdk-pixbuf-query-loaders which may be linked against libjpeg.so.8 so we'd
better make sure jpeg-native is available in the sysroot.

Signed-off-by: Mike Crowe <mac@mcrowe.com>
---
 meta/classes/pixbufcache.bbclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/classes/pixbufcache.bbclass b/meta/classes/pixbufcache.bbclass
index 9e6ecc8..755a654 100644
--- a/meta/classes/pixbufcache.bbclass
+++ b/meta/classes/pixbufcache.bbclass
@@ -72,6 +72,7 @@ PIXBUFCACHE_SYSROOT_DEPS_class-native = "\
     glib-2.0-native:do_populate_sysroot_setscene libffi-native:do_populate_sysroot_setscene \
     libpng-native:do_populate_sysroot_setscene zlib-native:do_populate_sysroot_setscene \
     harfbuzz-native:do_populate_sysroot_setscene \
+    ${@bb.utils.contains('PACKAGECONFIG', 'jpeg', 'jpeg-native:do_populate_sysroot_setscene', '', d)} \
     "
 do_populate_sysroot_setscene[depends] += "${PIXBUFCACHE_SYSROOT_DEPS}"
 do_populate_sysroot[depends] += "${@d.getVar('PIXBUFCACHE_SYSROOT_DEPS', True).replace('_setscene','')}"
-- 
2.1.4



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

* Re: [PATCH] pixbufcache: Ensure that jpeg-native is available for postinst if necessary
  2015-06-13 18:44 [PATCH] pixbufcache: Ensure that jpeg-native is available for postinst if necessary Mike Crowe
@ 2015-06-13 18:46 ` Mike Crowe
  2015-06-23 15:12 ` Phil Blundell
  1 sibling, 0 replies; 7+ messages in thread
From: Mike Crowe @ 2015-06-13 18:46 UTC (permalink / raw)
  To: openembedded-core

On Saturday 13 June 2015 at 19:44:41 +0100, Mike Crowe wrote:
> pixbufcache_sstate_postinst expects to be able to call
> gdk-pixbuf-query-loaders which may be linked against libjpeg.so.8 so we'd
> better make sure jpeg-native is available in the sysroot.
> 
> Signed-off-by: Mike Crowe <mac@mcrowe.com>
> ---
>  meta/classes/pixbufcache.bbclass | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/meta/classes/pixbufcache.bbclass b/meta/classes/pixbufcache.bbclass
> index 9e6ecc8..755a654 100644
> --- a/meta/classes/pixbufcache.bbclass
> +++ b/meta/classes/pixbufcache.bbclass
> @@ -72,6 +72,7 @@ PIXBUFCACHE_SYSROOT_DEPS_class-native = "\
>      glib-2.0-native:do_populate_sysroot_setscene libffi-native:do_populate_sysroot_setscene \
>      libpng-native:do_populate_sysroot_setscene zlib-native:do_populate_sysroot_setscene \
>      harfbuzz-native:do_populate_sysroot_setscene \
> +    ${@bb.utils.contains('PACKAGECONFIG', 'jpeg', 'jpeg-native:do_populate_sysroot_setscene', '', d)} \

If this patch is deemed acceptable then perhaps a similar check against
PACKAGECONFIG should be added to libpng-native?

Mike.


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

* Re: [PATCH] pixbufcache: Ensure that jpeg-native is available for postinst if necessary
  2015-06-13 18:44 [PATCH] pixbufcache: Ensure that jpeg-native is available for postinst if necessary Mike Crowe
  2015-06-13 18:46 ` Mike Crowe
@ 2015-06-23 15:12 ` Phil Blundell
  2015-06-23 15:20   ` Richard Purdie
  2015-06-23 15:25   ` Mike Crowe
  1 sibling, 2 replies; 7+ messages in thread
From: Phil Blundell @ 2015-06-23 15:12 UTC (permalink / raw)
  To: Mike Crowe; +Cc: openembedded-core

On Sat, 2015-06-13 at 19:44 +0100, Mike Crowe wrote:
> diff --git a/meta/classes/pixbufcache.bbclass b/meta/classes/pixbufcache.bbclass
> index 9e6ecc8..755a654 100644
> --- a/meta/classes/pixbufcache.bbclass
> +++ b/meta/classes/pixbufcache.bbclass
> @@ -72,6 +72,7 @@ PIXBUFCACHE_SYSROOT_DEPS_class-native = "\
>      glib-2.0-native:do_populate_sysroot_setscene libffi-native:do_populate_sysroot_setscene \
>      libpng-native:do_populate_sysroot_setscene zlib-native:do_populate_sysroot_setscene \
>      harfbuzz-native:do_populate_sysroot_setscene \
> +    ${@bb.utils.contains('PACKAGECONFIG', 'jpeg', 'jpeg-native:do_populate_sysroot_setscene', '', d)} \

I'm not sure this is quite right.  PACKAGECONFIG at the point this is
expanded will be the PACKAGECONFIG for whatever recipe is currently
inheriting pixbufcache.bbclass, whereas I think what you really need
here is the PACKAGECONFIG that gdk-pixbuf itself was built with.  Or,
er, something.

p.




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

* Re: [PATCH] pixbufcache: Ensure that jpeg-native is available for postinst if necessary
  2015-06-23 15:12 ` Phil Blundell
@ 2015-06-23 15:20   ` Richard Purdie
  2015-06-23 18:46     ` Mike Crowe
  2015-06-23 15:25   ` Mike Crowe
  1 sibling, 1 reply; 7+ messages in thread
From: Richard Purdie @ 2015-06-23 15:20 UTC (permalink / raw)
  To: Phil Blundell; +Cc: Mike Crowe, openembedded-core

On Tue, 2015-06-23 at 16:12 +0100, Phil Blundell wrote:
> On Sat, 2015-06-13 at 19:44 +0100, Mike Crowe wrote:
> > diff --git a/meta/classes/pixbufcache.bbclass b/meta/classes/pixbufcache.bbclass
> > index 9e6ecc8..755a654 100644
> > --- a/meta/classes/pixbufcache.bbclass
> > +++ b/meta/classes/pixbufcache.bbclass
> > @@ -72,6 +72,7 @@ PIXBUFCACHE_SYSROOT_DEPS_class-native = "\
> >      glib-2.0-native:do_populate_sysroot_setscene libffi-native:do_populate_sysroot_setscene \
> >      libpng-native:do_populate_sysroot_setscene zlib-native:do_populate_sysroot_setscene \
> >      harfbuzz-native:do_populate_sysroot_setscene \
> > +    ${@bb.utils.contains('PACKAGECONFIG', 'jpeg', 'jpeg-native:do_populate_sysroot_setscene', '', d)} \
> 
> I'm not sure this is quite right.  PACKAGECONFIG at the point this is
> expanded will be the PACKAGECONFIG for whatever recipe is currently
> inheriting pixbufcache.bbclass, whereas I think what you really need
> here is the PACKAGECONFIG that gdk-pixbuf itself was built with.  Or,
> er, something.

Right, its not that simple. As it happens I was just looking at this
patch:

http://git.yoctoproject.org/cgit.cgi/poky-contrib/commit/?h=rpurdie/t222&id=32afecae2495b0486a044b66154573caf39144c7

which I proposed a while ago which does solve this problem, with some
ugliness in base.bbclass. I know Ross doesn't like it, neither do I, I
do prefer it to the pretty horrible things PIXBUFCACHE_SYSROOT_DEPS does
though.

Cheers,

Richard





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

* Re: [PATCH] pixbufcache: Ensure that jpeg-native is available for postinst if necessary
  2015-06-23 15:12 ` Phil Blundell
  2015-06-23 15:20   ` Richard Purdie
@ 2015-06-23 15:25   ` Mike Crowe
  2015-06-23 16:56     ` Richard Purdie
  1 sibling, 1 reply; 7+ messages in thread
From: Mike Crowe @ 2015-06-23 15:25 UTC (permalink / raw)
  To: Phil Blundell; +Cc: openembedded-core

On Tuesday 23 June 2015 at 16:12:26 +0100, Phil Blundell wrote:
> On Sat, 2015-06-13 at 19:44 +0100, Mike Crowe wrote:
> > diff --git a/meta/classes/pixbufcache.bbclass b/meta/classes/pixbufcache.bbclass
> > index 9e6ecc8..755a654 100644
> > --- a/meta/classes/pixbufcache.bbclass
> > +++ b/meta/classes/pixbufcache.bbclass
> > @@ -72,6 +72,7 @@ PIXBUFCACHE_SYSROOT_DEPS_class-native = "\
> >      glib-2.0-native:do_populate_sysroot_setscene libffi-native:do_populate_sysroot_setscene \
> >      libpng-native:do_populate_sysroot_setscene zlib-native:do_populate_sysroot_setscene \
> >      harfbuzz-native:do_populate_sysroot_setscene \
> > +    ${@bb.utils.contains('PACKAGECONFIG', 'jpeg', 'jpeg-native:do_populate_sysroot_setscene', '', d)} \
> 
> I'm not sure this is quite right.  PACKAGECONFIG at the point this is
> expanded will be the PACKAGECONFIG for whatever recipe is currently
> inheriting pixbufcache.bbclass, whereas I think what you really need
> here is the PACKAGECONFIG that gdk-pixbuf itself was built with.  Or,
> er, something.

The problem I was seeing was with gdk-pixbuf itself so it sounds like I
need to add the dependency only when '${BPN}' == 'gdk-pixbuf' itself. I'll
have a go at that.

Thanks.

Mike.



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

* Re: [PATCH] pixbufcache: Ensure that jpeg-native is available for postinst if necessary
  2015-06-23 15:25   ` Mike Crowe
@ 2015-06-23 16:56     ` Richard Purdie
  0 siblings, 0 replies; 7+ messages in thread
From: Richard Purdie @ 2015-06-23 16:56 UTC (permalink / raw)
  To: Mike Crowe; +Cc: openembedded-core

On Tue, 2015-06-23 at 16:25 +0100, Mike Crowe wrote:
> On Tuesday 23 June 2015 at 16:12:26 +0100, Phil Blundell wrote:
> > On Sat, 2015-06-13 at 19:44 +0100, Mike Crowe wrote:
> > > diff --git a/meta/classes/pixbufcache.bbclass b/meta/classes/pixbufcache.bbclass
> > > index 9e6ecc8..755a654 100644
> > > --- a/meta/classes/pixbufcache.bbclass
> > > +++ b/meta/classes/pixbufcache.bbclass
> > > @@ -72,6 +72,7 @@ PIXBUFCACHE_SYSROOT_DEPS_class-native = "\
> > >      glib-2.0-native:do_populate_sysroot_setscene libffi-native:do_populate_sysroot_setscene \
> > >      libpng-native:do_populate_sysroot_setscene zlib-native:do_populate_sysroot_setscene \
> > >      harfbuzz-native:do_populate_sysroot_setscene \
> > > +    ${@bb.utils.contains('PACKAGECONFIG', 'jpeg', 'jpeg-native:do_populate_sysroot_setscene', '', d)} \
> > 
> > I'm not sure this is quite right.  PACKAGECONFIG at the point this is
> > expanded will be the PACKAGECONFIG for whatever recipe is currently
> > inheriting pixbufcache.bbclass, whereas I think what you really need
> > here is the PACKAGECONFIG that gdk-pixbuf itself was built with.  Or,
> > er, something.
> 
> The problem I was seeing was with gdk-pixbuf itself so it sounds like I
> need to add the dependency only when '${BPN}' == 'gdk-pixbuf' itself. I'll
> have a go at that.

I'm still not convinced this is the right route to go down. I'd much
rather find a way to improve my other patch with the right abstractions,
or just accept the ugliness in base.bbclass...

Cheers,

Richard




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

* Re: [PATCH] pixbufcache: Ensure that jpeg-native is available for postinst if necessary
  2015-06-23 15:20   ` Richard Purdie
@ 2015-06-23 18:46     ` Mike Crowe
  0 siblings, 0 replies; 7+ messages in thread
From: Mike Crowe @ 2015-06-23 18:46 UTC (permalink / raw)
  To: Richard Purdie; +Cc: openembedded-core

On Tuesday 23 June 2015 at 16:20:51 +0100, Richard Purdie wrote:
> On Tue, 2015-06-23 at 16:12 +0100, Phil Blundell wrote:
> > On Sat, 2015-06-13 at 19:44 +0100, Mike Crowe wrote:
> > > diff --git a/meta/classes/pixbufcache.bbclass b/meta/classes/pixbufcache.bbclass
> > > index 9e6ecc8..755a654 100644
> > > --- a/meta/classes/pixbufcache.bbclass
> > > +++ b/meta/classes/pixbufcache.bbclass
> > > @@ -72,6 +72,7 @@ PIXBUFCACHE_SYSROOT_DEPS_class-native = "\
> > >      glib-2.0-native:do_populate_sysroot_setscene libffi-native:do_populate_sysroot_setscene \
> > >      libpng-native:do_populate_sysroot_setscene zlib-native:do_populate_sysroot_setscene \
> > >      harfbuzz-native:do_populate_sysroot_setscene \
> > > +    ${@bb.utils.contains('PACKAGECONFIG', 'jpeg', 'jpeg-native:do_populate_sysroot_setscene', '', d)} \
> > 
> > I'm not sure this is quite right.  PACKAGECONFIG at the point this is
> > expanded will be the PACKAGECONFIG for whatever recipe is currently
> > inheriting pixbufcache.bbclass, whereas I think what you really need
> > here is the PACKAGECONFIG that gdk-pixbuf itself was built with.  Or,
> > er, something.
> 
> Right, its not that simple. As it happens I was just looking at this
> patch:
> 
> http://git.yoctoproject.org/cgit.cgi/poky-contrib/commit/?h=rpurdie/t222&id=32afecae2495b0486a044b66154573caf39144c7
> 
> which I proposed a while ago which does solve this problem, with some
> ugliness in base.bbclass. I know Ross doesn't like it, neither do I, I
> do prefer it to the pretty horrible things PIXBUFCACHE_SYSROOT_DEPS does
> though.

Based on my (probably incomplete) understanding of the problem and your
solution:

The setscene tasks for libpng-native, jpeg-native etc. will all be run
automatically as setscene tasks. The problem is that they might not run
before pixbufcache_sstate_postinst does.

The existing hack, which I extended inexpertly, ensured that the setscene
tasks run in the right order so that libpng-native, jpeg-native etc. are
definitely present in the sysroot prior to pixbufcache_sstate_postinst
running.

Would it be possible to make your change less "ugly" by making it more
generic. For example, adding a companion to SSTATEPOSTINSTFUNCS named
SSTATELATEPOSTINSTFUNCS that runs at the sceneQueueComplete event?

Alternatively, I'm afraid that I don't understand why pixbufcache.bbclass
can't have its own event handler which would at least keep the ugliness in
a single file.

Having said all that, I'm slightly worried about what would happen if
gdk-pixbuf-native were to be resurrected from sstate but jpeg-native could
not be (e.g. perhaps the file has gone missing.) The end of setscene would
still be too early to run the postinst in that case. I've not experimented
to see if this can really happen though.

I'm prepared to have a go at trying to fix this in an acceptable way but
I'm not really sure how to go about it. :(

Thanks.

Mike.


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

end of thread, other threads:[~2015-06-23 18:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-13 18:44 [PATCH] pixbufcache: Ensure that jpeg-native is available for postinst if necessary Mike Crowe
2015-06-13 18:46 ` Mike Crowe
2015-06-23 15:12 ` Phil Blundell
2015-06-23 15:20   ` Richard Purdie
2015-06-23 18:46     ` Mike Crowe
2015-06-23 15:25   ` Mike Crowe
2015-06-23 16:56     ` Richard Purdie

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.