Patchwork [1/5] pixbufcache: update the loader cache when installing natively

login
register
mail settings
Submitter Ross Burton
Date May 17, 2013, 9:40 a.m.
Message ID <18b03e64401ab99a14b03fe662f84cb58ac3ddc9.1368783549.git.ross.burton@intel.com>
Download mbox | patch
Permalink /patch/50029/
State New
Headers show

Comments

Ross Burton - May 17, 2013, 9:40 a.m.
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@intel.com>
---
 meta/classes/pixbufcache.bbclass |   13 +++++++++++++
 1 file changed, 13 insertions(+)
Ross Burton - May 17, 2013, 10:49 a.m.
On 17 May 2013 10:40, Ross Burton <ross.burton@intel.com> wrote:
> Register a sstate postinst function so that when installing a native package,
> the gdk-pixbuf loader cache is updated.

Retracting this, a last-minute change introduced a dependency cycle.
V2 coming shortly.

Ross

Patch

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
+}