Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/1] devtool: check locale and refuse to start if it isn't UTF-8
@ 2017-01-19 20:35 Paul Eggleton
  2017-01-19 20:36 ` [PATCH 1/1] " Paul Eggleton
  0 siblings, 1 reply; 2+ messages in thread
From: Paul Eggleton @ 2017-01-19 20:35 UTC (permalink / raw)
  To: openembedded-core

The following changes since commit a7cb408dd784178197687a2129e936620bf6a0d3:

  sanity.bbclass: Improved error message (2017-01-17 11:31:31 +0000)

are available in the git repository at:

  git://git.openembedded.org/openembedded-core-contrib paule/devtool-utf8
  http://cgit.openembedded.org/openembedded-core-contrib/log/?h=paule/devtool-utf8

Paul Eggleton (1):
  devtool: check locale and refuse to start if it isn't UTF-8

 scripts/devtool | 3 +++
 1 file changed, 3 insertions(+)

-- 
2.5.5



^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH 1/1] devtool: check locale and refuse to start if it isn't UTF-8
  2017-01-19 20:35 [PATCH 0/1] devtool: check locale and refuse to start if it isn't UTF-8 Paul Eggleton
@ 2017-01-19 20:36 ` Paul Eggleton
  0 siblings, 0 replies; 2+ messages in thread
From: Paul Eggleton @ 2017-01-19 20:36 UTC (permalink / raw)
  To: openembedded-core

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].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 scripts/devtool | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/scripts/devtool b/scripts/devtool
index 0866be9..c9ad9dd 100755
--- a/scripts/devtool
+++ b/scripts/devtool
@@ -215,6 +215,9 @@ def main():
     global config
     global context
 
+    if sys.getfilesystemencoding() != "utf-8":
+        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.")
+
     context = Context(fixed_setup=False)
 
     # Default basepath
-- 
2.5.5



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-01-19 20:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-19 20:35 [PATCH 0/1] devtool: check locale and refuse to start if it isn't UTF-8 Paul Eggleton
2017-01-19 20:36 ` [PATCH 1/1] " Paul Eggleton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox