summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2018-10-01 18:47:20 +0200
committerJürg Billeter <j@bitron.ch>2018-10-03 07:08:21 +0200
commit8dc16d3fef8d6e8242d757059f58c5988bbb8eda (patch)
tree066fd9147d2b3f86cff830c29aebd5f7895291f9
parentdae842fd0ba159ab8443fe279e8c8ba1de8871f8 (diff)
downloadbuildstream-8dc16d3fef8d6e8242d757059f58c5988bbb8eda.tar.gz
_platform/linux.py: Accept all configs for dummy sandbox
If Sandbox.run() is never called, sandbox config is irrelevant. If it is called, the build will fail anyway with the dummy sandbox. This matches the logic in the Darwin platform.
-rw-r--r--buildstream/_platform/linux.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/buildstream/_platform/linux.py b/buildstream/_platform/linux.py
index 85bfbd852..97fbb47be 100644
--- a/buildstream/_platform/linux.py
+++ b/buildstream/_platform/linux.py
@@ -55,6 +55,10 @@ class Linux(Platform):
return SandboxBwrap(*args, **kwargs)
def check_sandbox_config(self, config):
+ if not self._local_sandbox_available():
+ # Accept all sandbox configs as it's irrelevant with the dummy sandbox (no Sandbox.run).
+ return True
+
if self._user_ns_available:
# User namespace support allows arbitrary build UID/GID settings.
return True