<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">Hi Ross,<br><br>On Mon, Jul 21, 2014 at 2:49 PM, Burton, Ross <span dir="ltr"><<a href="mailto:ross.burton@intel.com" target="_blank">ross.burton@intel.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="">On 21 July 2014 13:39, Jacob Kroon <<a href="mailto:jacob.kroon@mikrodidakt.se">jacob.kroon@mikrodidakt.se</a>> wrote:<br>
> gdk-pixbuf-native uses png and jpeg loaders. When updating the<br>
> loader-cache, these needs to be already populated in the sysroot.<br>
><br>
> Although png was present, the jpeg dependency was missing, so add it.<br>
<br>
</div>But those dependencies are dependent on a PACKAGECONFIG setting, so<br>
you'll potentially be forcing a build of libjpeg purely to satisfy a<br>
fetch from sstate of a JPEG-disabled gdk-pixbuf. Also, libtiff and<br>
libjasper are missing.<br>
<br>
If we can't change the sysroot creation order so that the order is<br>
zlib, libpng, libjpeg, and then gdk-pixbuf then I think this needs to<br>
be pulled out to a function that can do neater logic, such as iterate<br>
through PACKAGECONFIG and add the required dependencies (for each<br>
enabled option, turn the build depends into<br>
%s-native:do_populate_sysroot_setscene).<br>
<span class=""><font color="#888888"><br></font></span></blockquote><br></div><div class="gmail_quote">What about something like the patch below. It looks at the package's DEPENDS,<br>and for native packages just adds them to <br>
<br>do_populate_sysroot[depends]<br>do_populate_sysroot_setscene[depends]<br><br></div>diff --git a/meta/classes/pixbufcache.bbclass b/meta/classes/pixbufcache.bbclass<br>index b8d75bd..86cadad 100644<br>--- a/meta/classes/pixbufcache.bbclass<br>
+++ b/meta/classes/pixbufcache.bbclass<br>@@ -47,6 +47,8 @@ python populate_packages_append() {<br> <br> #<br> # Add an sstate postinst hook to update the cache for native packages.<br>+# For this to work, the dependencies of the package itself need to be<br>
+# populated first.<br> # An error exit during populate_sysroot_setscene allows bitbake to<br> # try to recover by re-building the package.<br> #<br>@@ -59,14 +61,15 @@ pixbufcache_sstate_postinst() {<br> fi<br> }<br>
<br>-# Add all of the dependencies of gdk-pixbuf as dependencies of<br>-# do_populate_sysroot_setscene so that pixbufcache_sstate_postinst can work<br>-# (otherwise gdk-pixbuf-query-loaders may not exist or link). Only add<br>
-# gdk-pixbuf-native if we're not building gdk-pixbuf itself.<br>-#<br>-# Packages that use this class should extend this variable with their runtime<br>-# dependencies.<br>-PIXBUFCACHE_SYSROOT_DEPS = ""<br>
-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"<br>
-do_populate_sysroot_setscene[depends] += "${PIXBUFCACHE_SYSROOT_DEPS}"<br>-do_populate_sysroot[depends] += "${@d.getVar('PIXBUFCACHE_SYSROOT_DEPS', True).replace('_setscene','')}"<br>
+python () {<br>+ pn = d.getVar('PN', True)<br>+ if not pn.endswith('-native'):<br>+ return<br>+ for pkg in d.getVar('DEPENDS', True).split():<br>+ d.appendVarFlag('do_populate_sysroot',<br>
+ 'depends',<br>+ ' ' + pkg + ':do_populate_sysroot')<br>+ d.appendVarFlag('do_populate_sysroot_setscene',<br>+ 'depends',<br>
+ ' ' + pkg + ':do_populate_sysroot_setscene')<br>+}<br>diff --git a/meta/recipes-gnome/librsvg/<a href="http://librsvg_2.40.2.bb">librsvg_2.40.2.bb</a> b/meta/recipes-gnome/librsvg/<a href="http://librsvg_2.40.2.bb">librsvg_2.40.2.bb</a><br>
index 34d8ca1..27659aa 100644<br>--- a/meta/recipes-gnome/librsvg/<a href="http://librsvg_2.40.2.bb">librsvg_2.40.2.bb</a><br>+++ b/meta/recipes-gnome/librsvg/<a href="http://librsvg_2.40.2.bb">librsvg_2.40.2.bb</a><br>@@ -51,5 +51,3 @@ FILES_rsvg = "${bindir}/rsvg* \<br>
FILES_librsvg-gtk = "${libdir}/gdk-pixbuf-2.0/*/*/*.so"<br> <br> PIXBUF_PACKAGES = "librsvg-gtk"<br>-<br>-PIXBUFCACHE_SYSROOT_DEPS_append_class-native = " harfbuzz-native:do_populate_sysroot_setscene pango-native:do_populate_sysroot_setscene icu-native:do_populate_sysroot_setscene"<br>
-- <br>1.9.3<br><br><br></div></div>