summaryrefslogtreecommitdiff
path: root/buildstream
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.van.berkom@gmail.com>2018-10-04 14:11:27 +0000
committerTristan Van Berkom <tristan.van.berkom@gmail.com>2018-10-04 14:11:27 +0000
commit8630bac464a9b98654485a2b8699eb38083b0eb5 (patch)
tree886dac1dc4aee71053d7948422664d36c5dc6d10 /buildstream
parentfd6a957366e5abe3cddc225118969205000e182d (diff)
parent788cde6a050d6d455b37ba21a0ee4a35a0872bc2 (diff)
downloadbuildstream-8630bac464a9b98654485a2b8699eb38083b0eb5.tar.gz
Merge branch 'Qinusty/634-workspace-failed-builds' into 'master'
Do not save workspace on failed build Closes #634 See merge request BuildStream/buildstream!812
Diffstat (limited to 'buildstream')
-rw-r--r--buildstream/element.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/buildstream/element.py b/buildstream/element.py
index 9154f10e8..25ef22ed2 100644
--- a/buildstream/element.py
+++ b/buildstream/element.py
@@ -212,7 +212,7 @@ class Element(Plugin):
self.__staged_sources_directory = None # Location where Element.stage_sources() was called
self.__tainted = None # Whether the artifact is tainted and should not be shared
self.__required = False # Whether the artifact is required in the current session
- self.__build_result = None # The result of assembling this Element
+ self.__build_result = None # The result of assembling this Element (success, description, detail)
self._build_log_path = None # The path of the build log for this Element
# hash tables of loaded artifact metadata, hashed by key
@@ -1479,11 +1479,13 @@ class Element(Plugin):
self._update_state()
- if self._get_workspace() and self._cached():
+ if self._get_workspace() and self._cached_success():
+ assert utils._is_main_process(), \
+ "Attempted to save workspace configuration from child process"
#
# Note that this block can only happen in the
- # main process, since `self._cached()` cannot
- # be true when assembly is completed in the task.
+ # main process, since `self._cached_success()` cannot
+ # be true when assembly is successful in the task.
#
# For this reason, it is safe to update and
# save the workspaces configuration