]> code.ossystems Code Review - openembedded-core.git/commitdiff
fontcache.bbclass: add fontconfig-utils runtime dependency
authorMatthieu Crapet <Matthieu.Crapet@ingenico.com>
Thu, 20 Mar 2014 09:18:38 +0000 (10:18 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 21 Mar 2014 12:05:28 +0000 (12:05 +0000)
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>
meta/classes/fontcache.bbclass
meta/conf/documentation.conf
meta/recipes-graphics/ttf-fonts/liberation-fonts_1.04.bb
meta/recipes-graphics/ttf-fonts/ttf-bitstream-vera_1.10.bb

index 325bcae58f4e6cb92a5e90ec195d6e74177d3200..afd3fd22528694777984ed296417b902c18fcd2f 100644 (file)
@@ -7,6 +7,7 @@ DEPENDS += "qemu-native"
 inherit qemu
 
 FONT_PACKAGES ??= "${PN}"
+FONT_EXTRA_RDEPENDS ?= "fontconfig-utils"
 
 fontcache_common() {
 if [ "x$D" != "x" ] ; then
@@ -19,8 +20,11 @@ fi
 
 python populate_packages_append() {
     font_pkgs = d.getVar('FONT_PACKAGES', True).split()
+    deps = d.getVar("FONT_EXTRA_RDEPENDS", True)
 
     for pkg in font_pkgs:
+        if deps: d.appendVar('RDEPENDS_' + pkg, ' '+deps)
+
         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:
index 53c3da23a75e30467830ee7dbb927ada2d4a5ef8..4d49a02eceeebe32351c088da01edf8b98e4175b 100644 (file)
@@ -173,6 +173,7 @@ FILESEXTRAPATHS[doc] = "Extends the search path the OpenEmbedded build system us
 FILESOVERRIDES[doc] = "A subset of OVERRIDES used by the OpenEmbedded build system for creating FILESPATH."
 FILESPATH[doc] = "The default set of directories the OpenEmbedded build system uses when searching for patches and files. It is defined in the base.bbclass class found in meta/classes in the Source Directory. Do not hand-edit the FILESPATH variable."
 FILESYSTEM_PERMS_TABLES[doc] = "Allows you to define your own file permissions settings table as part of your configuration for the packaging process."
+FONT_EXTRA_RDEPENDS[doc] = "When a recipe inherits the fontcache class, this variable specifies runtime dependencies for font packages. This variable defaults to 'fontconfig-utils'."
 FONT_PACKAGES[doc] = "When a recipe inherits the fontcache class, this variable identifies packages containing font files that need to be cached by Fontconfig."
 FULL_OPTIMIZATION[doc]= "The options to pass in TARGET_CFLAGS and CFLAGS when compiling an optimized system. This variable defaults to '-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2'."
 
index c99521f9b61663726d01e33fc4b17caf98e4c17b..89fa4b211dabdf44e6e3f1214d8ca03075f52175 100644 (file)
@@ -8,7 +8,6 @@ BUGTRACKER = "https://bugzilla.redhat.com/"
 SECTION = "x11/fonts"
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
-RDEPENDS_${PN} = "fontconfig-utils"
 PR = "r4"
 PE = "1"
 
index 75f78a2745ac3fcbbfe88f1afde0cbd5d04d33ab..b2e4cef39d993386d9a0c845a8b930d212a974e4 100644 (file)
@@ -8,7 +8,6 @@ SECTION = "x11/fonts"
 LICENSE = "BitstreamVera"
 LIC_FILES_CHKSUM = "file://COPYRIGHT.TXT;md5=27d7484b1e18d0ee4ce538644a3f04be"
 PR = "r7"
-RDEPENDS_${PN} = "fontconfig-utils"
 
 inherit fontcache