Laurentiu Palcu : add fontcache.bbclass
Quoted 8 lines · On Wed, Feb 06, 2013 at 09:38:02AM +0000, [email protected] wrote:
Module: openembedded-core.git Branch: master Commit: 0c12f7fb3c2c42e5b633682bb1277b943ac19ea6 URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=0c12f7fb3c2c42e5b633682bb1277b943ac19ea6Author: Laurentiu Palcu <[email protected]> Date: Thu Jan 31 09:59:10 2013 +0200
Quoted 8 lines
add fontcache.bbclass
All font packages should inherit this class in order to generate the proper postinst/postrm scriptlets.
The scriptlets will actually create a host intercept hook that will be executed at the end, at
do_rootfstime, after all packages have been installed. This is good when there are many font packages.
Fails in do_rootfs here, but without any details in log:
Building from feeds activated!
Running intercept scripts:
Quoted 1 line
Executing
update_font_cache
ERROR: Function failed: do_rootfs (see /OE/shr-core/tmp-eglibc/work/tuna-oe-linux-gnueabi/shr-image/2.0-r20/temp/log.do_rootfs.2236 for further information)
Quoted 69 lines
[YOCTO #2923]
Signed-off-by Laurentiu Palcu <[email protected]>Signed-off-by Saul Wold <[email protected]>---
meta/classes/fontcache.bbclass | 47 ++++++++++++++++++++++++++++++++++++++++ 1 files changed, 47 insertions(+), 0 deletions(-)meta/classes/fontcache.bbclass new file +47
-0@@ -0,0 +1,47 @@ +# +# This class will generate the proper postinst/postrm scriptlets for font +# packages. +# + +DEPENDS += "qemu-native" +inherit qemu + +FONT_PACKAGES ??= "${PN}" + +fontcache_common() { +if [ "x$D" != "x" ] ; then + if [ ! -f $INTERCEPT_DIR/update_font_cache ]; then + cat << "EOF" > $INTERCEPT_DIR/update_font_cache +#!/bin/sh + +${@qemu_run_binary(d, '$D', '/usr/bin/fc-cache')} --sysroot=$D >/dev/null 2>&1 + +if [ $? -ne 0 ]; then + exit 1 +fi + +EOF + fi + exit 0 +fi + +fc-cache +} + +python populate_packages_append() { + font_pkgs = d.getVar('FONT_PACKAGES', True).split() + + for pkg in font_pkgs: + bb.note("adding fonts postinst and postrm scripts to %s" % pkg) + postinst = d.getVar('pkg_postinst_%s' % pkg, True) or d.getVar('pkg_postinst', True) + if not postinst: + postinst = '#!/bin/sh\n' + postinst += d.getVar('fontcache_common', True) + d.setVar('pkg_postinst_%s' % pkg, postinst) + + postrm = d.getVar('pkg_postrm_%s' % pkg, True) or d.getVar('pkg_postrm', True) + if not postrm: + postrm = '#!/bin/sh\n' + postrm += d.getVar('fontcache_common', True) + d.setVar('pkg_postrm_%s' % pkg, postrm) +}_______________________________________________
Openembedded-commits mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-commits
Signature · 1 line
Martin 'JaMa' Jansa jabber: [email protected]
Quoted 8 lines · Martin Jansa
Fails in
do_rootfshere, but without any details in log:
Building from feeds activated!
Running intercept scripts:Quoted 1 line
Quoted 1 line
Executing
update_font_cacheERROR: Function failed:
do_rootfs(see /OE/shr-core/tmp-eglibc/work/tuna-oe-linux-gnueabi/shr-image/2.0-r20/temp/log.do_rootfs.2236 for further information)
Most probably fontconfig package was not rebuilt with the new sysroot feature. Can you run the native fc-cache with --help and look for a sysroot option? If it's there, than it's probably a qemu issue... :/
Thanks,
Laurentiu
Quoted 6 lines · Laurentiu Palcu
Quoted 3 lines · Martin Jansa
Fails in
do_rootfshere, but without any details in log:
Building from feeds activated!
Running intercept scripts:
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Quoted 1 line
Executing
update_font_cacheERROR: Function failed:
do_rootfs(see /OE/shr-core/tmp-eglibc/work/tuna-oe-linux-gnueabi/shr-image/2.0-r20/temp/log.do_rootfs.2236 for further information)Most probably fontconfig package was not rebuilt with the new sysroot feature. Can you run the native fc-cache with --help and look for a sysroot option? If it's there, than it's probably a qemu issue... :/
It fails only on some machines I'm building (3 machines from 6) and only sometimes (last run it was only on 2 from 6)
Now I was running it manually and got nice error finally:
Running intercept scripts:
Quoted 1 line
Executing
update_font_cache
readelf: Error:
'/OE/shr-core/tmp-eglibc/work/tuna-oe-linux-gnueabi/shr-image/2.0-r20/rootfs/usr/bin/fc-cache':
No such file
ERROR: intercept script "update_font_cache" failed!
So something is pulling interceptor without runtime dependency on fontconfig.
Cheers,
Signature · 1 line
Martin 'JaMa' Jansa jabber: [email protected]
Quoted 20 lines · Martin Jansa
Quoted 6 lines · Laurentiu Palcu
Quoted 3 lines · Martin Jansa
Fails in
do_rootfshere, but without any details in log:
Building from feeds activated!
Running intercept scripts:Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Quoted 1 line
Executing
update_font_cacheERROR: Function failed:
do_rootfs(see /OE/shr-core/tmp-eglibc/work/tuna-oe-linux-gnueabi/shr-image/2.0-r20/temp/log.do_rootfs.2236 for further information)Most probably fontconfig package was not rebuilt with the new sysroot feature. Can you run the native fc-cache with --help and look for a sysroot option? If it's there, than it's probably a qemu issue... :/
It fails only on some machines I'm building (3 machines from 6) and only sometimes (last run it was only on 2 from 6)
Now I was running it manually and got nice error finally:
Running intercept scripts:
Quoted 8 lines
Quoted 1 line
Executing
update_font_cachereadelf: Error:
'/OE/shr-core/tmp-eglibc/work/tuna-oe-linux-gnueabi/shr-image/2.0-r20/rootfs/usr/bin/fc-cache':
No such file
ERROR: intercept script "update_font_cache" failed!So something is pulling interceptor without runtime dependency on fontconfig.
In the end it wasn't fs-cache missing, but /usr/bin/crossscripts/qemuwrapper in some sysroots
bitbake -c cleansstate qemuwrapper-cross
for each MACHINE and building it again resolved that..
Signature · 1 line
Martin 'JaMa' Jansa jabber: [email protected]
Quoted 12 lines · Martin Jansa
Quoted 11 lines · Martin Jansa
On Wed, Feb 06, 2013 at 02:08:41PM +0200, Laurentiu Palcu wrote:
It fails only on some machines I'm building (3 machines from 6) and only sometimes (last run it was only on 2 from 6)Now I was running it manually and got nice error finally:
Running intercept scripts:Quoted 1 line
Executing
update_font_cachereadelf: Error:
'/OE/shr-core/tmp-eglibc/work/tuna-oe-linux-gnueabi/shr-image/2.0-r20/rootfs/usr/bin/fc-cache':
No such file
ERROR: intercept script "update_font_cache" failed!
Quoted 8 lines
Quoted 2 lines
So something is pulling interceptor without runtime dependency on fontconfig.
In the end it wasn't fs-cache missing, but
/usr/bin/crossscripts/qemuwrapperin some sysrootsbitbake -c cleansstate qemuwrapper-cross
for each MACHINE and building it again resolved that..
The sstate package for this recipe was corrupted. There is a fix in master for this and a few other issues this patchset raised.
Cheers,
Richard