Skip to contentSkip to conversation

fontcache: fix fonts postinst failed

PATCH In review Hongxu Jia 3 participants 5 messages Oct 26, 2016 – Nov 30, 2017

lore
Share & tools
lore

Hongxu Jia

author
#0 lore raw

cover fontcache: fix fonts postinst failed

1. Test steps:

1) edit local.conf:
---
IMAGE_INSTALL_append = " liberation-fonts"
---

2) Build image.
bitbake core-image-minimal

2. Expected:
No build warning of "The postinstall intercept hook 'update_font_cache' failed"

//Hongxu

The following changes since commit ef627ab364d52fe19994c94c1a78fbe21620a32c:

local.conf.sample.extended: remove RM_OLD_IMAGE (2016-10-19 17:07:41 +0100)

are available in the git repository at:

git://git.openembedded.org/openembedded-core-contrib hongxu/fix-font
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=hongxu/fix-font

Hongxu Jia (1):
fontcache: fix fonts postinst failed

 meta/classes/fontcache.bbclass | 4 ++++
 1 file changed, 4 insertions(+)
Signature · 1 line
2.8.1
author
#1 lore raw

PATCH 1/1 fontcache: fix fonts postinst failed

While instal liberation-fonts to image, the fonts postinst
failed at do_rootfs time:
-----------------------------------------------
|WARNING: core-image-minimal-1.0-r0 do_rootfs: The postinstall intercept hook 'update_font_cache' failed (exit code: 139)! See log for details! |WARNING: core-image-minimal-1.0-r0 do_rootfs: The postinstalls for the following packages will be postponed for first boot: liberation-fonts
-----------------------------------------------

Since the following commit applied in oe-core
-----------------------------------------------
commit ce1e7fcc60276040477c1d5e3129e029bb9f204b

Author: Richard Purdie <[email protected]>
Date:   Fri Sep 30 17:43:23 2016 +0100

allarch: Fixes to stop rebuilds when change multilibs
-----------------------------------------------
It assignes base_libdir="/none" which caused fonts postinst failed at do_rootfs.

The fonts postinst invoke qemu to update font cache which requires base_libdir arch relative(such as base_libdir="/lib64").

We refer what meta/conf/multilib.conf does, assign it with arch relative.

---
 meta/classes/fontcache.bbclass | 4 ++++
 1 file changed, 4 insertions(+)
meta/classes/fontcache.bbclass +4 -0
index 8ebdfc4..ce22170 100644
@@ -38,6 +38,10 @@ python () {
 }
 
 python add_fontcache_postinsts() {
+    baselib = d.getVar('BASE_LIB_tune-' + (d.getVar('DEFAULTTUNE', True) or 'INVALID'), True) or \
+              d.getVar('BASELIB', True)
+    d.setVar("baselib", baselib)
+
     for pkg in d.getVar('FONT_PACKAGES', True).split():
         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)
Signature · 1 line
2.8.1
#2 lore raw
Quoted 21 lines · Hongxu Jia

While instal liberation-fonts to image, the fonts postinst failed at do_rootfs time:
-----------------------------------------------
|WARNING: core-image-minimal-1.0-r0 do_rootfs: The postinstall intercept hook
'update_font_cache' failed (exit code: 139)! See log for details! |WARNING: core-image-minimal-1.0-r0 do_rootfs: The postinstalls for the following packages will be postponed for first boot: liberation-fonts
-----------------------------------------------

Since the following commit applied in oe-core
-----------------------------------------------
commit ce1e7fcc60276040477c1d5e3129e029bb9f204b

Author: Richard Purdie <[email protected]>
Date:   Fri Sep 30 17:43:23 2016 +0100

allarch: Fixes to stop rebuilds when change multilibs
-----------------------------------------------
It assignes base_libdir="/none" which caused fonts postinst failed at do_rootfs.

Quoted 6 lines

The fonts postinst invoke qemu to update font cache which requires base_libdir arch relative(such as base_libdir="/lib64").

We refer what meta/conf/multilib.conf does, assign it with arch relative.

Without this, we get the mentioned warnings with every qemux86-64 or intel-corei7-64 build using our external toolchain. Were there any objections to merging this? It doesn’t seem as though it ever went in, but this was a year ago now.

Signature · 4 lines
Christopher Larson
kergoth at gmail dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Senior Software Engineer, Mentor Graphics
#3 lore raw

Ah, that would be why I have this in a local branch:

http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=ross/allarch

I rediscovered this on Friday... personally I think my solution is better as it's global instead of needing to be worked around in each place where this can happen, but am open to debate on this.

Ross

Quoted 42 lines · Christopher Larson
Quoted 21 lines · Hongxu Jia

While instal liberation-fonts to image, the fonts postinst failed at do_rootfs time:
-----------------------------------------------
|WARNING: core-image-minimal-1.0-r0 do_rootfs: The postinstall intercept hook
'update_font_cache' failed (exit code: 139)! See log for details! |WARNING: core-image-minimal-1.0-r0 do_rootfs: The postinstalls for the following packages will be postponed for first boot: liberation-fonts
-----------------------------------------------

Since the following commit applied in oe-core
-----------------------------------------------
commit ce1e7fcc60276040477c1d5e3129e029bb9f204b

Author: Richard Purdie <[email protected]>
Date:   Fri Sep 30 17:43:23 2016 +0100

allarch: Fixes to stop rebuilds when change multilibs
-----------------------------------------------
It assignes base_libdir="/none" which caused fonts postinst failed at do_rootfs.

Quoted 6 lines

The fonts postinst invoke qemu to update font cache which requires base_libdir arch relative(such as base_libdir="/lib64").

We refer what meta/conf/multilib.conf does, assign it with arch relative.

Without this, we get the mentioned warnings with every qemux86-64 or intel-corei7-64 build using our external toolchain. Were there any objections to merging this? It doesn’t seem as though it ever went in, but this was a year ago now.
--
Christopher Larson
kergoth at gmail dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Senior Software Engineer, Mentor Graphics

#4 lore raw
Quoted 9 lines · Ross

Ah, that would be why I have this in a local branch:

http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/
commit/?h=ross/allarch

I rediscovered this on Friday... personally I think my solution is better as it's global instead of needing to be worked around in each place where this can happen, but am open to debate on this.

Agreed, yours does seem cleaner, as long as there aren’t unintended consequences. I can’t say I’m clear on the issues relating to allarch sharing amongst multilib configurations.

Signature · 4 lines
Christopher Larson
kergoth at gmail dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Senior Software Engineer, Mentor Graphics