diff options
author | Lars Wirzenius <liw@liw.fi> | 2018-01-27 19:39:06 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2018-01-27 19:44:51 +0200 |
commit | c10b7f60a6b11fa8cfaac8ae82db886ef20731a5 (patch) | |
tree | a9017c93f3a114829e9c8ff24ce2436dd45bb0bd | |
parent | 59cb84c15b7410c1ab8999ed2a36841490102332 (diff) | |
download | ick2-c10b7f60a6b11fa8cfaac8ae82db886ef20731a5.tar.gz |
Add: set LC_ALL and DEBIAN_FRONTEND when running commands
-rw-r--r-- | NEWS | 4 | ||||
-rwxr-xr-x | worker_manager | 7 |
2 files changed, 10 insertions, 1 deletions
@@ -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) |