summaryrefslogtreecommitdiff
path: root/buildstream
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2018-03-06 21:04:32 +0900
committerTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2018-03-06 21:20:27 +0900
commitbe6b5564595872c9e6ff54c3d812be1061c0837d (patch)
tree4abbf2b373a26703aec748769e90c0e549194a78 /buildstream
parentf8a71cabb009e04dc8deee8c1244ab75e06420a2 (diff)
downloadbuildstream-be6b5564595872c9e6ff54c3d812be1061c0837d.tar.gz
Removing all traces of `environment-inherit` shell configuration.
This is made redundant by the more complete `environment` configuration, so lets quickly remove the former in this new format version 4.
Diffstat (limited to 'buildstream')
-rw-r--r--buildstream/_project.py5
-rw-r--r--buildstream/element.py7
2 files changed, 2 insertions, 10 deletions
diff --git a/buildstream/_project.py b/buildstream/_project.py
index 253d5210d..db0b7aee9 100644
--- a/buildstream/_project.py
+++ b/buildstream/_project.py
@@ -103,7 +103,6 @@ class Project():
# Shell options
self._shell_command = [] # The default interactive shell command
- self._shell_env_inherit = [] # Environment vars to inherit when non-isolated
self._shell_environment = {} # Statically set environment vars
self._shell_host_files = [] # A list of HostMount objects
@@ -299,11 +298,9 @@ class Project():
# Parse shell options
shell_options = _yaml.node_get(config, Mapping, 'shell', default_value={})
- _yaml.node_validate(shell_options, ['command', 'environment-inherit', 'environment', 'host-files'])
+ _yaml.node_validate(shell_options, ['command', 'environment', 'host-files'])
self._shell_command = _yaml.node_get(shell_options, list, 'command',
default_value=['sh', '-i'])
- self._shell_env_inherit = _yaml.node_get(shell_options, list, 'environment-inherit',
- default_value=[])
# Perform environment expansion right away
shell_environment = _yaml.node_get(shell_options, Mapping, 'environment', default_value={})
diff --git a/buildstream/element.py b/buildstream/element.py
index ad0e87bcf..394439e37 100644
--- a/buildstream/element.py
+++ b/buildstream/element.py
@@ -1434,12 +1434,7 @@ class Element(Plugin):
#
flags |= SandboxFlags.NETWORK_ENABLED | SandboxFlags.INHERIT_UID
- # Use the project defined list of env vars to inherit
- for inherit in project._shell_env_inherit:
- if os.environ.get(inherit) is not None:
- environment[inherit] = os.environ.get(inherit)
-
- # Now add in the explicitly set environment variables
+ # Apply project defined environment vars to set for a shell
for key, value in _yaml.node_items(project._shell_environment):
environment[key] = value