[OE-core] [PATCH 1/5] pixbufcache: update the loader cache when installing natively

Ross Burton ross.burton at intel.com
Fri May 17 09:40:41 UTC 2013


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>
---
 meta/classes/pixbufcache.bbclass |   13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/meta/classes/pixbufcache.bbclass b/meta/classes/pixbufcache.bbclass
index 37bf812..0596018 100644
--- a/meta/classes/pixbufcache.bbclass
+++ b/meta/classes/pixbufcache.bbclass
@@ -44,3 +44,16 @@ 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
+#
+DEPENDS_append_class-native = " gdk-pixbuf-native"
+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
+}
-- 
1.7.10.4





More information about the Openembedded-core mailing list