Patchwork pixbufcache: Add missing dependency on jpeg-native

login
register
mail settings
Submitter Jacob Kroon
Date July 21, 2014, 12:39 p.m.
Message ID <1405946349-16124-1-git-send-email-jacob.kroon@mikrodidakt.se>
Download mbox | patch
Permalink /patch/76179/
State New
Headers show

Comments

Jacob Kroon - July 21, 2014, 12:39 p.m.
gdk-pixbuf-native uses png and jpeg loaders. When updating the
loader-cache, these needs to be already populated in the sysroot.

Although png was present, the jpeg dependency was missing, so add it.

Fixes:
  DEBUG: Executing shell function pixbufcache_sstate_postinst
  g_module_open() failed for <snip>/libpixbufloader-jpeg.so:
    libjpeg.so.8: cannot open shared object file: No such file or directory

Signed-off-by: Jacob Kroon <jacob.kroon@mikrodidakt.se>
---
 meta/classes/pixbufcache.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Ross Burton - July 21, 2014, 12:49 p.m.
On 21 July 2014 13:39, Jacob Kroon <jacob.kroon@mikrodidakt.se> wrote:
> gdk-pixbuf-native uses png and jpeg loaders. When updating the
> loader-cache, these needs to be already populated in the sysroot.
>
> Although png was present, the jpeg dependency was missing, so add it.

But those dependencies are dependent on a PACKAGECONFIG setting, so
you'll potentially be forcing a build of libjpeg purely to satisfy a
fetch from sstate of a JPEG-disabled gdk-pixbuf.  Also, libtiff and
libjasper are missing.

If we can't change the sysroot creation order so that the order is
zlib, libpng, libjpeg, and then gdk-pixbuf then I think this needs to
be pulled out to a function that can do neater logic, such as iterate
through PACKAGECONFIG and add the required dependencies (for each
enabled option, turn the build depends into
%s-native:do_populate_sysroot_setscene).

Ross
Chris Larson - July 21, 2014, 3:40 p.m.
On Mon, Jul 21, 2014 at 5:49 AM, Burton, Ross <ross.burton@intel.com> wrote:

> If we can't change the sysroot creation order so that the order is
> zlib, libpng, libjpeg, and then gdk-pixbuf then I think this needs to
> be pulled out to a function that can do neater logic, such as iterate
> through PACKAGECONFIG and add the required dependencies (for each
> enabled option, turn the build depends into
> %s-native:do_populate_sysroot_setscene).
>

I'm a bit confused by this. It's the class that needs to know the deps, and
it's inherited by a bunch of recipes, but the packageconfig you're talking
about is in the gdk-pixbuf-native recipe -- how is it going to iterate over
the packageconfig of another recipe, or are you saying that the
packageconfigs of anyone using pixbufcache need to mirror that of the tool
in question?

Patch

diff --git a/meta/classes/pixbufcache.bbclass b/meta/classes/pixbufcache.bbclass
index b8d75bd..418ace0 100644
--- a/meta/classes/pixbufcache.bbclass
+++ b/meta/classes/pixbufcache.bbclass
@@ -67,6 +67,6 @@  pixbufcache_sstate_postinst() {
 # Packages that use this class should extend this variable with their runtime
 # dependencies.
 PIXBUFCACHE_SYSROOT_DEPS = ""
-PIXBUFCACHE_SYSROOT_DEPS_class-native = "${@['gdk-pixbuf-native:do_populate_sysroot_setscene', '']['${BPN}' == 'gdk-pixbuf']} 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"
+PIXBUFCACHE_SYSROOT_DEPS_class-native = "${@['gdk-pixbuf-native:do_populate_sysroot_setscene', '']['${BPN}' == 'gdk-pixbuf']} glib-2.0-native:do_populate_sysroot_setscene libffi-native:do_populate_sysroot_setscene libpng-native:do_populate_sysroot_setscene jpeg-native:do_populate_sysroot_setscene zlib-native:do_populate_sysroot_setscene"
 do_populate_sysroot_setscene[depends] += "${PIXBUFCACHE_SYSROOT_DEPS}"
 do_populate_sysroot[depends] += "${@d.getVar('PIXBUFCACHE_SYSROOT_DEPS', True).replace('_setscene','')}"