diff options
author | Jürg Billeter <j@bitron.ch> | 2018-10-04 11:48:13 +0200 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2018-11-27 13:41:09 +0000 |
commit | bb7c3213ee42209d3dcb4f9ad369900a042b638a (patch) | |
tree | cd4068e2e28ef0668e740dc52ddb35cd2a173abe /buildstream/element.py | |
parent | 024d584d62fef84468a0b54b687aeb85dc874e4a (diff) | |
download | buildstream-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.py | 7 |
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: |