[2/3] image.bbclass: respect PACKAGE_NO_GCONV

Submitted by Kang Kai on Dec. 5, 2018, 1 p.m. | Patch ID: 156931

Details

Message ID 7b9d6a806450eef1089958dff7b74097c0205046.1544014163.git.kai.kang@windriver.com
State Master Next
Commit 85240094175a8ea726bfba19c00d4556a62862fc
Headers show

Commit Message

Kang Kai Dec. 5, 2018, 1 p.m.
From: Kai Kang <kai.kang@windriver.com>

It installs locale-base-* packages according to var IMAGE_LINGUAS.
Packages locale-base-* are split in libc-package.bbclass if variable
PACKAGE_NO_GCONV is not set. When none of ditro features libc-charsets
libc-locales and libc-locale-code is set, PACKAGE_NO_GCONV is set. Then
no locale-base-* is created and fails to create image.

Clear IMAGE_LINGUAS in such situation.

Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
 meta/classes/image.bbclass | 5 +++++
 1 file changed, 5 insertions(+)

Patch hide | download patch | download mbox

diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 276d0d31f4..11927f39f5 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -176,6 +176,11 @@  IMAGE_LINGUAS ?= "de-de fr-fr en-gb"
 
 LINGUAS_INSTALL ?= "${@" ".join(map(lambda s: "locale-base-%s" % s, d.getVar('IMAGE_LINGUAS').split()))}"
 
+python () {
+    if not bb.utils.contains('DISTRO_FEATURES', 'libc-charsets libc-locale-code libc-locales', True, False, d):
+        d.setVar('IMAGE_LINGUAS', '')
+}
+
 # Prefer image, but use the fallback files for lookups if the image ones
 # aren't yet available.
 PSEUDO_PASSWD = "${IMAGE_ROOTFS}:${STAGING_DIR_NATIVE}"