[oe-commits] Ross Burton : pixbufcache: update the loader cache when installing natively
git at git.openembedded.org
git at git.openembedded.org
Fri May 24 13:09:24 UTC 2013
Module: openembedded-core.git
Branch: master
Commit: 7cbde5d8f2b88ec4e79cb0d564ee0f3c9baa7c2d
URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=7cbde5d8f2b88ec4e79cb0d564ee0f3c9baa7c2d
Author: Ross Burton <ross.burton at intel.com>
Date: Fri May 17 09:52:04 2013 +0100
pixbufcache: update the loader cache when installing natively
Register a sstate postinst function so that when installing a native package,
the gdk-pixbuf loader cache is updated.
Signed-off-by: Ross Burton <ross.burton at intel.com>
Signed-off-by: Saul Wold <sgw at linux.intel.com>
---
meta/classes/pixbufcache.bbclass | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/meta/classes/pixbufcache.bbclass b/meta/classes/pixbufcache.bbclass
index 37bf812..274d67d 100644
--- a/meta/classes/pixbufcache.bbclass
+++ b/meta/classes/pixbufcache.bbclass
@@ -44,3 +44,23 @@ python populate_packages_append() {
postrm += d.getVar('pixbufcache_common', True)
d.setVar('pkg_postrm_%s' % pkg, postrm)
}
+
+#
+# Add a sstate postinst hook to update the cache for native packages
+#
+SSTATEPOSTINSTFUNCS_append_class-native = " pixbufcache_sstate_postinst"
+
+pixbufcache_sstate_postinst() {
+ if [ "${BB_CURRENTTASK}" = "populate_sysroot" -o "${BB_CURRENTTASK}" = "populate_sysroot_setscene" ]
+ then
+ gdk-pixbuf-query-loaders --update-cache
+ 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.
+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"
+do_populate_sysroot_setscene[depends] += "${PIXBUFCACHE_SYSROOT_DEPS}"
More information about the Openembedded-commits
mailing list