diff options
-rw-r--r-- | morphlib/buildenvironment.py | 5 | ||||
-rw-r--r-- | morphlib/buildenvironment_tests.py | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/morphlib/buildenvironment.py b/morphlib/buildenvironment.py index 2afa4a65..3e334135 100644 --- a/morphlib/buildenvironment.py +++ b/morphlib/buildenvironment.py @@ -44,7 +44,6 @@ class BuildEnvironment(): # copy a set of white-listed variables from the original env copied_vars = dict.fromkeys([ 'DISTCC_HOSTS', - 'TMPDIR', 'LD_PRELOAD', 'LD_LIBRARY_PATH', 'FAKEROOTKEY', @@ -61,6 +60,10 @@ class BuildEnvironment(): if copied_vars[name] is not None: env[name] = copied_vars[name] + if settings['bootstrap'] or not settings['staging-chroot']: + if 'TMPDIR' in self._osenv: + env['TMPDIR'] = self._osenv['TMPDIR'] + env['TERM'] = self._override_term env['SHELL'] = self._override_shell env['USER'] = \ diff --git a/morphlib/buildenvironment_tests.py b/morphlib/buildenvironment_tests.py index 2c21eeef..f0efdb60 100644 --- a/morphlib/buildenvironment_tests.py +++ b/morphlib/buildenvironment_tests.py @@ -32,6 +32,7 @@ class BuildEnvironmentTests(unittest.TestCase): 'ccache-remotedir': '', 'ccache-remotenlevels': 2, 'no-distcc': True, + 'staging-chroot': False, } self.fake_env = { 'PATH': '/fake_bin', |