diff options
author | Ross Burton <ross.burton@intel.com> | 2016-05-24 17:37:45 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-05-30 15:58:10 +0100 |
commit | 7b3061e5e762cfae3f161532c188e2bfd878ce88 (patch) | |
tree | 9c154bea37f646475dc1ddd3c8c624faf4ef4178 /meta/classes | |
parent | 4c3738c1496e9f269076861e44a48befebbde39c (diff) | |
download | poky-7b3061e5e762cfae3f161532c188e2bfd878ce88.tar.gz |
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>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | 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 77813e41bc..3d5ace20a7 100644 --- a/meta/classes/sanity.bbclass +++ b/meta/classes/sanity.bbclass | |||
@@ -765,6 +765,17 @@ def check_sanity_version_change(status, d): | |||
765 | # Check that TMPDIR isn't located on nfs | 765 | # Check that TMPDIR isn't located on nfs |
766 | status.addresult(check_not_nfs(tmpdir, "TMPDIR")) | 766 | status.addresult(check_not_nfs(tmpdir, "TMPDIR")) |
767 | 767 | ||
768 | def sanity_check_locale(d): | ||
769 | """ | ||
770 | Currently bitbake switches locale to en_US.UTF-8 so check that this locale actually exists. | ||
771 | """ | ||
772 | import locale | ||
773 | try: | ||
774 | locale.setlocale(locale.LC_ALL, "en_US.UTF-8") | ||
775 | except locale.Error: | ||
776 | raise_sanity_error("You system needs to support the en_US.UTF-8 locale.", d) | ||
777 | locale.setlocale(locale.LC_ALL, "C") | ||
778 | |||
768 | def check_sanity_everybuild(status, d): | 779 | def check_sanity_everybuild(status, d): |
769 | import os, stat | 780 | import os, stat |
770 | # Sanity tests which test the users environment so need to run at each build (or are so cheap | 781 | # 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): | |||
784 | if (LooseVersion(bb.__version__) < LooseVersion(minversion)): | 795 | if (LooseVersion(bb.__version__) < LooseVersion(minversion)): |
785 | status.addresult('Bitbake version %s is required and version %s was found\n' % (minversion, bb.__version__)) | 796 | status.addresult('Bitbake version %s is required and version %s was found\n' % (minversion, bb.__version__)) |
786 | 797 | ||
798 | sanity_check_locale(d) | ||
799 | |||
787 | sanity_check_conffiles(status, d) | 800 | sanity_check_conffiles(status, d) |
788 | 801 | ||
789 | paths = d.getVar('PATH', True).split(":") | 802 | paths = d.getVar('PATH', True).split(":") |