summaryrefslogtreecommitdiffstats
path: root/meta/classes/pixbufcache.bbclass
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2013-05-17 09:52:04 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-05-24 14:14:38 +0100
commit204b92c663b1a8561ab683ecc2a89b55f2e37570 (patch)
treef2d885303be777d86f753ce50013c9064390a484 /meta/classes/pixbufcache.bbclass
parentbd85102951517e1dd30e214c7d04516c04609932 (diff)
downloadpoky-204b92c663b1a8561ab683ecc2a89b55f2e37570.tar.gz
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. (From OE-Core rev: 7cbde5d8f2b88ec4e79cb0d564ee0f3c9baa7c2d) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/pixbufcache.bbclass')
-rw-r--r--meta/classes/pixbufcache.bbclass20
1 files changed, 20 insertions, 0 deletions
diff --git a/meta/classes/pixbufcache.bbclass b/meta/classes/pixbufcache.bbclass
index 37bf812b07..274d67d593 100644
--- a/meta/classes/pixbufcache.bbclass
+++ b/meta/classes/pixbufcache.bbclass
@@ -44,3 +44,23 @@ python populate_packages_append() {
44 postrm += d.getVar('pixbufcache_common', True) 44 postrm += d.getVar('pixbufcache_common', True)
45 d.setVar('pkg_postrm_%s' % pkg, postrm) 45 d.setVar('pkg_postrm_%s' % pkg, postrm)
46} 46}
47
48#
49# Add a sstate postinst hook to update the cache for native packages
50#
51SSTATEPOSTINSTFUNCS_append_class-native = " pixbufcache_sstate_postinst"
52
53pixbufcache_sstate_postinst() {
54 if [ "${BB_CURRENTTASK}" = "populate_sysroot" -o "${BB_CURRENTTASK}" = "populate_sysroot_setscene" ]
55 then
56 gdk-pixbuf-query-loaders --update-cache
57 fi
58}
59
60# Add all of the dependencies of gdk-pixbuf as dependencies of
61# do_populate_sysroot_setscene so that pixbufcache_sstate_postinst can work
62# (otherwise gdk-pixbuf-query-loaders may not exist or link). Only add
63# gdk-pixbuf-native if we're not building gdk-pixbuf itself.
64PIXBUFCACHE_SYSROOT_DEPS = ""
65PIXBUFCACHE_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"
66do_populate_sysroot_setscene[depends] += "${PIXBUFCACHE_SYSROOT_DEPS}"