summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS4
-rwxr-xr-xworker_manager7
2 files changed, 10 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index d6f3d77..1d7459e 100644
--- a/NEWS
+++ b/NEWS
@@ -35,6 +35,10 @@ Version 0.23+git, not yet released
* When an action is run in a chroot, the `/proc` and `/sys`
filesystems get bind mounted temporarily into the chroot.
+* Shell and python actions (in chroot, container, or host) now get the
+ environment variable `LC_ALL` set to `C`, and `DEBIAN_FRONTEND` set
+ to `noninteractive`.
+
Version 0.23, released 2018-01-22
----------------------------------
diff --git a/worker_manager b/worker_manager
index e2cbc32..efb84cd 100755
--- a/worker_manager
+++ b/worker_manager
@@ -411,6 +411,11 @@ class WorkerBase:
params_text = self.params64(params)
argv = self.get_argv(work, params_text)
mounts = []
+ env = dict(os.environ)
+ env.update({
+ 'LC_ALL': 'C',
+ 'DEBIAN_FRONTEND': 'noninteractive',
+ })
if self.where(work) == 'chroot':
logging.debug('CHROOT REQUESTED')
argv = ['sudo', 'chroot', self._workspace] + argv
@@ -432,7 +437,7 @@ class WorkerBase:
logging.debug('HOST REQUESTED')
runner = Runner(self._post)
with Mounter(mounts, runner):
- return runner.runcmd(argv, cwd=self._workspace)
+ return runner.runcmd(argv, cwd=self._workspace, env=env)
def params64(self, params):
as_json = json.dumps(params)