summaryrefslogtreecommitdiffstats
path: root/meta/classes/fontcache.bbclass
AgeCommit message (Collapse)Author
2020-05-27multilib/recipes: Use new RecipePostKeyExpansion eventRichard Purdie
There are issues with multilib due to the ordering of events where some functions see the remapped multilib dependencies and some do not. A significant problem is that the multilib class needs to make some changes before key expansion and some afterwards but by using existing event handlers, some code sees things in a partially translated state, leading to bugs. This patch changes things to use a new event handler from bitbake which makes the ordering of the changes explcit. The challenge in doing this is that it breaks some existing anonymous python and dyanmic assignments. In some cases these used to be translated and no longer are, meaning MLPREFIX has to be added. In some cases these are now translated and the MLPREFIX can be removed. This change does now make it very clear when MLPREFIX is required and when it is not, its just the migration path which is harder. The patch changes the small number of cases where fixes are needed. In particular, where a variable like RDEPENDS is conditionally extended (e.g. with an override), MLPREFIX is now required. This patch also reverts: base: Revert 'base.bbclass: considering multilib when setting LICENSE_EXCLUSION' This reverts 6597130256a1609c3e05ec5891aceaf549c37985 as the changes to multilib datastore handling mean its no longer necessary. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-01-27fontcache: fix indentationRoss Burton
Signed-off-by: Ross Burton <ross.burton@intel.com>
2019-01-24fontcache: fix postinst for nativesdk caseAlexander Kanavin
Both installing the binary into the correct place, and passing that place to postinst_intercept were missing. Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-06-18qemuwrapper-cross: enable multilib and nativesdk variants of the scriptAlexander Kanavin
Previously only one global variant of the script was created, which caused numerous issues: 1) multilib was not properly supported due to multilib variants each needing their own version of the qemu binary and library paths to be set 2) nativesdk was not properly supported for the same reason This patch also moves setting LD_LIBRARY_PATH directly into the recipe, as passing it down from other recipes did not work when said recipes were allarch, and adjusts calls to qemuwrapper from postinst-intercepts, so that its correct variant is selected. Also, the various qemu fallbacks in qemuwrapper script are all removed, as they are no longer necessary. Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-19fontcache.bbclass: Add PACKAGE_WRITE_DEPS for postinstJussi Kukkonen
Qemu is used to run fc-cache on postinstall. Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
2016-12-16meta: remove True option to getVar callsJoshua Lock
getVar() now defaults to expanding by default, thus remove the True option from getVar() calls with a regex search and replace. Search made with the following regex: getVar ?\(( ?[^,()]*), True\) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-10-01fontcache: allow to pass extra parameters and environment to fc-cacheMartin Jansa
* this can be useful for passing extra parameters, pass -v by default to see what's going on in do_rootfs * we need to use this for extra parameter we implemented in fontconfig: --ignore-mtime always use cache file regardless of font directory mtime because the checksum of fontcache generated in do_rootfs doesn't match with /usr/share/fonts directory as seen on target device causing fontconfig to re-create the cache when fontconfig is used for first time or worse create new cache in every user's home directory when /usr/ filesystem is read only and cache cannot be updated. Running FC_DEBUG=16 fc-cache -v on such device shows: FcCacheTimeValid dir "/usr/share/fonts" cache checksum 1441207803 dir checksum 1441206149 * my guess is that the checksum is different, because pseudo (which is unloaded when running qemuwrapper) or because some influence of running the rootfs under qemu. Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-21fontcache: allow to pass different fontconfig cache dirMartin Jansa
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-03-16fontcache.bbclass: prepend to PACKAGEFUNCS instead of appendingJonathan Liu
Appending to PACKAGEFUNCS results in the font packages missing the postinst/postrm scripts and the fontconfig cache not being generated in /var/cache/fontconfig when creating images or installing font packages. This is because the package data has already been emitted by emit_pkgdata in PACKAGEFUNCS. Prepend to PACKAGEFUNCS to ensure add_fontcache_postinsts is executed before emit_pkgdata. [YOCTO #7410] Signed-off-by: Jonathan Liu <net147@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-03-16postinst-intercepts/update_font_cache: fix ownership of fontconfig cacheJonathan Liu
The file ownership of the cache files in /var/cache/fontconfig needs to be set to root:root otherwise it inherits the user and group id of the build user. [YOCTO #7411] Signed-off-by: Jonathan Liu <net147@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-07-17fontcache: Fix build dependency errorsRichard Purdie
This addresses warnings like: WARNING: QA Issue: liberation-fonts rdepends on fontconfig-utils but its not a build dependency? [build-deps] since the dependencies were being added at package time and were not visible to bitbake. Also take the opportunity to convert to use PACKAGEFUNCS rather than the horrible populate_packages_append. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-21fontcache.bbclass: add fontconfig-utils runtime dependencyMatthieu Crapet
In an image recipe, you can get a warning, for example: WARNING: The postinstall intercept hook 'update_font_cache' failed (exit code: 1)! See log for details! WARNING: The postinstalls for the following packages will be postponed for first boot: ttf-dejavu-sans-mono (because /usr/bin/fc-cache is missing) In OE-core, rdepend is correctly done in each recipe: - ttf-fonts/liberation-fonts - ttf-fonts/ttf-bitstream-vera In meta-OE, rdepend is not done but packagegroup-fonts-truetype.bb includes fontconfig-utils: - ttf-fonts/ttf-arphic-uming - ttf-fonts/ttf-dejavu - ttf-fonts/ttf-droid - ttf-fonts/ttf-gentium - ttf-fonts/ttf-hunkyfonts - ttf-fonts/ttf-inconsolata - ttf-fonts/ttf-liberation - ttf-fonts/ttf-mplus - ttf-fonts/ttf-sazanami - ttf-fonts/ttf-ubuntu-font-family - ttf-fonts/ttf-wqy-zenhei Signed-off-by: Matthieu Crapet <Matthieu.Crapet@ingenico.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-29Pass the mlprefix to postinst_intercept scriptLaurentiu Palcu
This is needed in order to have separate multilib intercept hooks. Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-04-22fontcache.bbclass: do not exit with 1 after installing intercept hookLaurentiu Palcu
This will allow to register, in a single postinstall, multiple hooks. Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-10postinst-intercepts, qemu.bbclass: fix segfaults in postinstallsLaurentiu Palcu
Postinstalls that use qemu are throwing a segmentation fault when building for qemux86-64 on a 64bit host (it might also happen for qemux86 if building on a 32bit host but I didn't test). It looks like qemu looks for ld.so.cache which is not found because it is generated after rootfs_(rpm|ipk|deb)_do_rootfs is called and then it tries to load libraries from the default paths (which are the host's). In order to avoid this, pass the LD_LIBRARY_PATH explicitly to the target's dynamic loader. Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-12fontcache.bbclass: use the postinst_intercept scriptLaurentiu Palcu
"Link" the package to the postinstall hook by running the postinst_intercept script. Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06add fontcache.bbclassLaurentiu Palcu
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_rootfs time, after all packages have been installed. This is good when there are many font packages. [YOCTO #2923] Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>