diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2017-01-20 09:36:00 +1300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-01-23 12:05:22 +0000 |
commit | 61f206195d8624380bb342e39992247157e24d63 (patch) | |
tree | f9285d0c0ea4ad88faa397ad6c1123e66405e8f7 | |
parent | be60ae52f2871b84db8cdc96f8ac18c09892104a (diff) | |
download | poky-61f206195d8624380bb342e39992247157e24d63.tar.gz |
devtool: check locale and refuse to start if it isn't UTF-8
We need to ensure the locale is UTF-8 or otherwise strange errors will
occur later on during execution - the same reason we check this in
BitBake itself. Unfortunately this check has to be before command line
parsing and therefore showing the help text in response to --help, since
that relies upon parsing bitbake's configuration (as we need to load
plugins in other layers).
Fixes [YOCTO #10908].
(From OE-Core rev: 370c6ba16c72bb52e80da098a5812ed1e09ac659)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-x | scripts/devtool | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/devtool b/scripts/devtool index 0866be9d5f..c9ad9ddb95 100755 --- a/scripts/devtool +++ b/scripts/devtool | |||
@@ -215,6 +215,9 @@ def main(): | |||
215 | global config | 215 | global config |
216 | global context | 216 | global context |
217 | 217 | ||
218 | if sys.getfilesystemencoding() != "utf-8": | ||
219 | sys.exit("Please use a locale setting which supports 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.") | ||
220 | |||
218 | context = Context(fixed_setup=False) | 221 | context = Context(fixed_setup=False) |
219 | 222 | ||
220 | # Default basepath | 223 | # Default basepath |