summaryrefslogtreecommitdiff
path: root/buildstream/element.py
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2018-10-04 11:48:13 +0200
committerJürg Billeter <j@bitron.ch>2018-11-27 13:41:09 +0000
commitbb7c3213ee42209d3dcb4f9ad369900a042b638a (patch)
treecd4068e2e28ef0668e740dc52ddb35cd2a173abe /buildstream/element.py
parent024d584d62fef84468a0b54b687aeb85dc874e4a (diff)
downloadbuildstream-bb7c3213ee42209d3dcb4f9ad369900a042b638a.tar.gz
element.py: Defer workspace.prepared setting in case of pending commands
Diffstat (limited to 'buildstream/element.py')
-rw-r--r--buildstream/element.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/buildstream/element.py b/buildstream/element.py
index c249ed2f2..582492d6b 100644
--- a/buildstream/element.py
+++ b/buildstream/element.py
@@ -2075,7 +2075,12 @@ class Element(Plugin):
self.prepare(sandbox)
if workspace:
- workspace.prepared = True
+ def mark_workspace_prepared():
+ workspace.prepared = True
+
+ # Defer workspace.prepared setting until pending batch commands
+ # have been executed.
+ sandbox._callback(mark_workspace_prepared)
def __is_cached(self, keystrength):
if keystrength is None: