summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2020-03-31 09:58:27 +0200
committerbst-marge-bot <marge-bot@buildstream.build>2020-04-14 15:30:49 +0000
commitd2a7f0a1285880c752315262199e230b520579db (patch)
tree349c69393256e6fdef0b700635e924514089fe60
parentd75b0fc080d57e78aea9ed7908cc7b3af5ad6e01 (diff)
downloadbuildstream-d2a7f0a1285880c752315262199e230b520579db.tar.gz
element.py: Move sandbox configuration check to __sandbox()
This allows `bst show` and other commands that don't require a sandbox to work with elements that are not supported by the current sandbox.
-rw-r--r--src/buildstream/element.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/buildstream/element.py b/src/buildstream/element.py
index 03b64e760..06581b652 100644
--- a/src/buildstream/element.py
+++ b/src/buildstream/element.py
@@ -328,10 +328,6 @@ class Element(Plugin):
# Extract Sandbox config
self.__sandbox_config = self.__extract_sandbox_config(context, project, meta)
- if not self.__use_remote_execution():
- platform = context.platform
- platform.check_sandbox_config(self.__sandbox_config)
-
def __lt__(self, other):
return self.name < other.name
@@ -2514,6 +2510,8 @@ class Element(Plugin):
yield sandbox
elif directory is not None and os.path.exists(directory):
+ platform = context.platform
+ platform.check_sandbox_config(config)
sandbox = platform.create_sandbox(
context,