[OE-core] [PATCH] pixbufcache: Add missing dependency on jpeg-native

Jacob Kroon jacob.kroon at gmail.com
Mon Jul 21 16:00:43 UTC 2014


Hi Ross,

On Mon, Jul 21, 2014 at 2:49 PM, Burton, Ross <ross.burton at intel.com> wrote:

> On 21 July 2014 13:39, Jacob Kroon <jacob.kroon at 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).
>
>
What about something like the patch below. It looks at the package's
DEPENDS,
and for native packages just adds them to

do_populate_sysroot[depends]
do_populate_sysroot_setscene[depends]

diff --git a/meta/classes/pixbufcache.bbclass
b/meta/classes/pixbufcache.bbclass
index b8d75bd..86cadad 100644
--- a/meta/classes/pixbufcache.bbclass
+++ b/meta/classes/pixbufcache.bbclass
@@ -47,6 +47,8 @@ python populate_packages_append() {

 #
 # Add an sstate postinst hook to update the cache for native packages.
+# For this to work, the dependencies of the package itself need to be
+# populated first.
 # An error exit during populate_sysroot_setscene allows bitbake to
 # try to recover by re-building the package.
 #
@@ -59,14 +61,15 @@ pixbufcache_sstate_postinst() {
     fi
 }

-# Add all of the dependencies of gdk-pixbuf as dependencies of
-# do_populate_sysroot_setscene so that pixbufcache_sstate_postinst can work
-# (otherwise gdk-pixbuf-query-loaders may not exist or link). Only add
-# gdk-pixbuf-native if we're not building gdk-pixbuf itself.
-#
-# 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"
-do_populate_sysroot_setscene[depends] += "${PIXBUFCACHE_SYSROOT_DEPS}"
-do_populate_sysroot[depends] += "${@d.getVar('PIXBUFCACHE_SYSROOT_DEPS',
True).replace('_setscene','')}"
+python () {
+    pn = d.getVar('PN', True)
+    if not pn.endswith('-native'):
+        return
+    for pkg in d.getVar('DEPENDS', True).split():
+        d.appendVarFlag('do_populate_sysroot',
+                        'depends',
+                        ' ' + pkg + ':do_populate_sysroot')
+        d.appendVarFlag('do_populate_sysroot_setscene',
+                        'depends',
+                        ' ' + pkg + ':do_populate_sysroot_setscene')
+}
diff --git a/meta/recipes-gnome/librsvg/librsvg_2.40.2.bb
b/meta/recipes-gnome/librsvg/librsvg_2.40.2.bb
index 34d8ca1..27659aa 100644
--- a/meta/recipes-gnome/librsvg/librsvg_2.40.2.bb
+++ b/meta/recipes-gnome/librsvg/librsvg_2.40.2.bb
@@ -51,5 +51,3 @@ FILES_rsvg = "${bindir}/rsvg* \
 FILES_librsvg-gtk = "${libdir}/gdk-pixbuf-2.0/*/*/*.so"

 PIXBUF_PACKAGES = "librsvg-gtk"
-
-PIXBUFCACHE_SYSROOT_DEPS_append_class-native = "
harfbuzz-native:do_populate_sysroot_setscene
pango-native:do_populate_sysroot_setscene
icu-native:do_populate_sysroot_setscene"
-- 
1.9.3
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20140721/7485b671/attachment-0002.html>


More information about the Openembedded-core mailing list