diff options
Diffstat (limited to 'src/buildstream/element.py')
-rw-r--r-- | src/buildstream/element.py | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/src/buildstream/element.py b/src/buildstream/element.py index bd702b112..580871802 100644 --- a/src/buildstream/element.py +++ b/src/buildstream/element.py @@ -96,7 +96,6 @@ from .utils import FileListResult, BST_ARBITRARY_TIMESTAMP from . import utils from . import _cachekey from . import _site -from ._platform import Platform from .node import Node from .plugin import Plugin from .sandbox import SandboxFlags, SandboxCommandError @@ -2708,11 +2707,6 @@ class Element(Plugin): else: sandbox_config = project._sandbox.clone() - # Get the platform to ask for host architecture - platform = context.platform - host_arch = platform.get_host_arch() - host_os = platform.get_host_os() - # The default config is already composited with the project overrides sandbox_defaults = cls.__defaults.get_mapping("sandbox", default={}) sandbox_defaults = sandbox_defaults.clone() @@ -2721,24 +2715,7 @@ class Element(Plugin): meta.sandbox._composite(sandbox_config) sandbox_config._assert_fully_composited() - # Sandbox config, unlike others, has fixed members so we should validate them - sandbox_config.validate_keys(["build-uid", "build-gid", "build-os", "build-arch"]) - - build_os = sandbox_config.get_str("build-os", default=None) - if build_os: - build_os = build_os.lower() - else: - build_os = host_os - - build_arch = sandbox_config.get_str("build-arch", default=None) - if build_arch: - build_arch = Platform.canonicalize_arch(build_arch) - else: - build_arch = host_arch - - return SandboxConfig( - sandbox_config.get_int("build-uid", None), sandbox_config.get_int("build-gid", None), build_os, build_arch, - ) + return SandboxConfig(sandbox_config, context.platform) # This makes a special exception for the split rules, which # elements may extend but whos defaults are defined in the project. |