aboutsummaryrefslogtreecommitdiffstats
path: root/bin/bitbake-server
diff options
context:
space:
mode:
authorFrank de Brabander <debrabander@gmail.com>2022-12-06 19:18:05 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-12-08 10:49:51 +0000
commita4ce040a6fd540a1cac52f808f909f9fcf8c961c (patch)
tree3e8c087f5ec05bff0745ee5cb5899d00f521cb58 /bin/bitbake-server
parent105f2897b0618713b036fc0f7a6e0f3e78d1707a (diff)
downloadbitbake-a4ce040a6fd540a1cac52f808f909f9fcf8c961c.tar.gz
bin/utils: Ensure locale en_US.UTF-8 is available on the system
Get rid of the duplicate code and add extra check that the locale en_US.UTF-8 is available on the system. This new helper method is now located right above the method filter_environment() which sets LC_ALL environment variable to 'en_US.UTF-8'. [YOCTO #10165] Signed-off-by: Frank de Brabander <debrabander@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bin/bitbake-server')
-rwxr-xr-xbin/bitbake-server5
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/bitbake-server b/bin/bitbake-server
index 825e9d56a..454a3919a 100755
--- a/bin/bitbake-server
+++ b/bin/bitbake-server
@@ -12,8 +12,9 @@ warnings.simplefilter("default")
import logging
sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(sys.argv[0])), 'lib'))
-if sys.getfilesystemencoding() != "utf-8":
- sys.exit("Please use a locale setting which supports UTF-8 (such as LANG=en_US.UTF-8).\nPython can't change the filesystem locale after loading so we need a UTF-8 when Python starts or things won't work.")
+import bb
+
+bb.utils.check_system_locale()
# Users shouldn't be running this code directly
if len(sys.argv) != 11 or not sys.argv[1].startswith("decafbad"):