[gnome-continuous-yocto/gnomeostree-3.28-rocko: 508/8267] sanity: check that the en_US.UTF-8 locale exists
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 508/8267] sanity: check that the en_US.UTF-8 locale exists
- Date: Sat, 16 Dec 2017 20:31:31 +0000 (UTC)
commit 7b3061e5e762cfae3f161532c188e2bfd878ce88
Author: Ross Burton <ross burton intel com>
Date: Tue May 24 17:37:45 2016 +0100
sanity: check that the en_US.UTF-8 locale exists
(From OE-Core rev: 55e335d93fe74da3cce220f34bfedcfc47132806)
Signed-off-by: Ross Burton <ross burton intel com>
Signed-off-by: Richard Purdie <richard purdie linuxfoundation org>
meta/classes/sanity.bbclass | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index 77813e4..3d5ace2 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -765,6 +765,17 @@ def check_sanity_version_change(status, d):
# Check that TMPDIR isn't located on nfs
status.addresult(check_not_nfs(tmpdir, "TMPDIR"))
+def sanity_check_locale(d):
+ """
+ Currently bitbake switches locale to en_US.UTF-8 so check that this locale actually exists.
+ """
+ import locale
+ try:
+ locale.setlocale(locale.LC_ALL, "en_US.UTF-8")
+ except locale.Error:
+ raise_sanity_error("You system needs to support the en_US.UTF-8 locale.", d)
+ locale.setlocale(locale.LC_ALL, "C")
+
def check_sanity_everybuild(status, d):
import os, stat
# Sanity tests which test the users environment so need to run at each build (or are so cheap
@@ -784,6 +795,8 @@ def check_sanity_everybuild(status, d):
if (LooseVersion(bb.__version__) < LooseVersion(minversion)):
status.addresult('Bitbake version %s is required and version %s was found\n' % (minversion,
bb.__version__))
+ sanity_check_locale(d)
+
sanity_check_conffiles(status, d)
paths = d.getVar('PATH', True).split(":")
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]