From 06deb4c4eb2bba43a67b4ffc0f34ce2b9f16adfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Billeter?= Date: Thu, 3 Jan 2019 18:38:47 +0100 Subject: element.py: Accept architecture aliases for sandbox config Accept common architecture aliases for the sandbox config for consistency with arch options. --- buildstream/element.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/buildstream/element.py b/buildstream/element.py index 3bfe62275..c5fbf772c 100644 --- a/buildstream/element.py +++ b/buildstream/element.py @@ -2441,11 +2441,17 @@ class Element(Plugin): # Sandbox config, unlike others, has fixed members so we should validate them _yaml.node_validate(sandbox_config, ['build-uid', 'build-gid', 'build-os', 'build-arch']) + build_arch = self.node_get_member(sandbox_config, str, 'build-arch', default=None) + if build_arch: + build_arch = Platform.canonicalize_arch(build_arch) + else: + build_arch = host_arch + return SandboxConfig( self.node_get_member(sandbox_config, int, 'build-uid'), self.node_get_member(sandbox_config, int, 'build-gid'), self.node_get_member(sandbox_config, str, 'build-os', default=host_os), - self.node_get_member(sandbox_config, str, 'build-arch', default=host_arch)) + build_arch) # This makes a special exception for the split rules, which # elements may extend but whos defaults are defined in the project. -- cgit v1.2.1