summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/utils.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/bitbake/lib/bb/utils.py b/bitbake/lib/bb/utils.py
index 0c553dd765..588c192c08 100644
--- a/bitbake/lib/bb/utils.py
+++ b/bitbake/lib/bb/utils.py
@@ -568,6 +568,7 @@ def preserved_envvars_exported():
568 'SHELL', 568 'SHELL',
569 'TERM', 569 'TERM',
570 'USER', 570 'USER',
571 'LC_ALL',
571 ] 572 ]
572 573
573def preserved_envvars(): 574def preserved_envvars():
@@ -595,6 +596,12 @@ def filter_environment(good_vars):
595 os.unsetenv(key) 596 os.unsetenv(key)
596 del os.environ[key] 597 del os.environ[key]
597 598
599 # If we spawn a python process, we need to have a UTF-8 locale, else python's file
600 # access methods will use ascii. You can't change that mode once the interpreter is
601 # started so we have to ensure a locale is set. Ideally we'd use C.UTF-8 but not all
602 # distros support that and we need to set something.
603 os.environ["LC_ALL"] = "en_US.UTF-8"
604
598 if removed_vars: 605 if removed_vars:
599 logger.debug(1, "Removed the following variables from the environment: %s", ", ".join(removed_vars.keys())) 606 logger.debug(1, "Removed the following variables from the environment: %s", ", ".join(removed_vars.keys()))
600 607