diff options
author | William Salmon <pointswaves@gmail.com> | 2020-05-08 16:54:11 +0100 |
---|---|---|
committer | William Salmon <pointswaves@gmail.com> | 2020-05-08 22:17:00 +0100 |
commit | ca1ca124f95d22aa5315c192e879137b5169a59d (patch) | |
tree | 1d30589b5a50adfa8af2a8d37650f0254fbc0ebb | |
parent | 14dd3598024b58e9e626897e7062dd9563a1502a (diff) | |
download | buildstream-ca1ca124f95d22aa5315c192e879137b5169a59d.tar.gz |
Expand sandbox values from environment
If sandbox: target_arch was a variable it was not being expanded, this
fixes this.
-rw-r--r-- | src/buildstream/element.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/buildstream/element.py b/src/buildstream/element.py index 862f00962..01975fe6a 100644 --- a/src/buildstream/element.py +++ b/src/buildstream/element.py @@ -305,11 +305,13 @@ class Element(Plugin): # Extract remote execution URL if meta.is_junction: self.__remote_execution_specs = None + sandbox_config = Node.from_dict({}) else: self.__remote_execution_specs = project.remote_execution_specs + sandbox_config = Node.from_dict(self.__expand_environment(project._sandbox.clone())) # Extract Sandbox config - self.__sandbox_config = self.__extract_sandbox_config(context, project, meta) + self.__sandbox_config = self.__extract_sandbox_config(context, sandbox_config, meta) def __lt__(self, other): return self.name < other.name @@ -2643,11 +2645,7 @@ class Element(Plugin): # Sandbox-specific configuration data, to be passed to the sandbox's constructor. # @classmethod - def __extract_sandbox_config(cls, context, project, meta): - if meta.is_junction: - sandbox_config = Node.from_dict({}) - else: - sandbox_config = project._sandbox.clone() + def __extract_sandbox_config(cls, context, sandbox_config, meta): # Get the platform to ask for host architecture platform = context.platform |