diff options
Diffstat (limited to 'meta/classes/pixbufcache.bbclass')
-rw-r--r-- | meta/classes/pixbufcache.bbclass | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/meta/classes/pixbufcache.bbclass b/meta/classes/pixbufcache.bbclass index 633a8757ed..aa9815cc6f 100644 --- a/meta/classes/pixbufcache.bbclass +++ b/meta/classes/pixbufcache.bbclass | |||
@@ -48,24 +48,17 @@ python populate_packages_append() { | |||
48 | } | 48 | } |
49 | 49 | ||
50 | gdkpixbuf_complete() { | 50 | gdkpixbuf_complete() { |
51 | GDK_PIXBUF_FATAL_LOADER=1 ${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders --update-cache || exit 1 | 51 | GDK_PIXBUF_FATAL_LOADER=1 ${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders --update-cache || exit 1 |
52 | } | 52 | } |
53 | 53 | ||
54 | # | ||
55 | # Add an sstate postinst hook to update the cache for native packages. | ||
56 | # An error exit during populate_sysroot_setscene allows bitbake to | ||
57 | # try to recover by re-building the package. | ||
58 | # | ||
59 | DEPENDS_append_class-native = " gdk-pixbuf-native" | 54 | DEPENDS_append_class-native = " gdk-pixbuf-native" |
60 | SSTATEPOSTINSTFUNCS_append_class-native = " pixbufcache_sstate_postinst" | 55 | SYSROOT_PREPROCESS_FUNCS_append_class-native = " pixbufcache_sstate_postinst" |
61 | 56 | ||
62 | # See base.bbclass for the other half of this | 57 | # See base.bbclass for the other half of this |
63 | pixbufcache_sstate_postinst() { | 58 | pixbufcache_sstate_postinst() { |
64 | if [ "${BB_CURRENTTASK}" = "populate_sysroot" ]; then | 59 | mkdir -p ${SYSROOT_DESTDIR}${bindir} |
65 | ${gdkpixbuf_complete} | 60 | dest=${SYSROOT_DESTDIR}${bindir}/postinst-useradd-${PN} |
66 | elif [ "${BB_CURRENTTASK}" = "populate_sysroot_setscene" ]; then | 61 | echo '#!/bin/sh' > $dest |
67 | if [ -x ${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders ]; then | 62 | echo "${gdkpixbuf_complete}" >> $dest |
68 | echo "${gdkpixbuf_complete}" >> ${STAGING_DIR}/sstatecompletions | 63 | chmod 0755 $dest |
69 | fi | ||
70 | fi | ||
71 | } | 64 | } |