<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">&lt;<a href="mailto:ross.burton@intel.com" target="_blank">ross.burton@intel.com</a>&gt;</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 &lt;<a href="mailto:jacob.kroon@mikrodidakt.se">jacob.kroon@mikrodidakt.se</a>&gt; wrote:<br>

&gt; gdk-pixbuf-native uses png and jpeg loaders. When updating the<br>
&gt; loader-cache, these needs to be already populated in the sysroot.<br>
&gt;<br>
&gt; 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&#39;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&#39;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&#39;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&#39;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 = &quot;&quot;<br>
-PIXBUFCACHE_SYSROOT_DEPS_class-native = &quot;${@[&#39;gdk-pixbuf-native:do_populate_sysroot_setscene&#39;, &#39;&#39;][&#39;${BPN}&#39; == &#39;gdk-pixbuf&#39;]} 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&quot;<br>
-do_populate_sysroot_setscene[depends] += &quot;${PIXBUFCACHE_SYSROOT_DEPS}&quot;<br>-do_populate_sysroot[depends] += &quot;${@d.getVar(&#39;PIXBUFCACHE_SYSROOT_DEPS&#39;, True).replace(&#39;_setscene&#39;,&#39;&#39;)}&quot;<br>
+python () {<br>+    pn = d.getVar(&#39;PN&#39;, True)<br>+    if not pn.endswith(&#39;-native&#39;):<br>+        return<br>+    for pkg in d.getVar(&#39;DEPENDS&#39;, True).split():<br>+        d.appendVarFlag(&#39;do_populate_sysroot&#39;,<br>
+                        &#39;depends&#39;,<br>+                        &#39; &#39; + pkg + &#39;:do_populate_sysroot&#39;)<br>+        d.appendVarFlag(&#39;do_populate_sysroot_setscene&#39;,<br>+                        &#39;depends&#39;,<br>
+                        &#39; &#39; + pkg + &#39;:do_populate_sysroot_setscene&#39;)<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 = &quot;${bindir}/rsvg* \<br>
 FILES_librsvg-gtk = &quot;${libdir}/gdk-pixbuf-2.0/*/*/*.so&quot;<br> <br> PIXBUF_PACKAGES = &quot;librsvg-gtk&quot;<br>-<br>-PIXBUFCACHE_SYSROOT_DEPS_append_class-native = &quot; harfbuzz-native:do_populate_sysroot_setscene pango-native:do_populate_sysroot_setscene icu-native:do_populate_sysroot_setscene&quot;<br>
-- <br>1.9.3<br><br><br></div></div>