summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2020-01-22 17:04:13 +0100
committerJürg Billeter <j@bitron.ch>2020-02-11 21:08:59 +0100
commit04c00da690bce67bd937a71dce5d84a338a0521f (patch)
tree1761ddfa82253786d7917aaf63d2fd30b8a3a797
parent7cd62cbc6e663890a87fad50b224671297e950c3 (diff)
downloadbuildstream-04c00da690bce67bd937a71dce5d84a338a0521f.tar.gz
_workspaces.py: Drop `prepared`
This will no longer be used in incremental builds. Successful configure commands will be recorded with a marker file in the buildtree of the last build artifact.
-rw-r--r--src/buildstream/_stream.py1
-rw-r--r--src/buildstream/_workspaces.py6
-rw-r--r--tests/frontend/workspace.py4
3 files changed, 4 insertions, 7 deletions
diff --git a/src/buildstream/_stream.py b/src/buildstream/_stream.py
index 18297c2e4..0687226ef 100644
--- a/src/buildstream/_stream.py
+++ b/src/buildstream/_stream.py
@@ -930,7 +930,6 @@ class Stream:
workspace_path = workspace.get_absolute_path()
if soft:
- workspace.prepared = False
workspace.last_successful = None
self._message(
MessageType.INFO, "Reset workspace state for {} at: {}".format(element.name, workspace_path)
diff --git a/src/buildstream/_workspaces.py b/src/buildstream/_workspaces.py
index 78ae962b6..1057e8521 100644
--- a/src/buildstream/_workspaces.py
+++ b/src/buildstream/_workspaces.py
@@ -242,8 +242,7 @@ class WorkspaceProjectCache:
# last_successful (str): The key of the last successful build of this workspace
#
class Workspace:
- def __init__(self, toplevel_project, *, last_successful=None, path=None, prepared=False):
- self.prepared = prepared
+ def __init__(self, toplevel_project, *, last_successful=None, path=None):
self.last_successful = last_successful
self._path = path
@@ -258,7 +257,7 @@ class Workspace:
# (dict) A dict representation of the workspace
#
def to_dict(self):
- ret = {"prepared": self.prepared, "path": self._path}
+ ret = {"path": self._path}
if self.last_successful is not None:
ret["last_successful"] = self.last_successful
return ret
@@ -516,7 +515,6 @@ class Workspaces:
#
def _load_workspace(self, node):
dictionary = {
- "prepared": node.get_bool("prepared", default=False),
"path": node.get_str("path"),
"last_successful": node.get_str("last_successful", default=None),
}
diff --git a/tests/frontend/workspace.py b/tests/frontend/workspace.py
index e09dd220a..f6bfb4362 100644
--- a/tests/frontend/workspace.py
+++ b/tests/frontend/workspace.py
@@ -846,10 +846,10 @@ def test_list_unsupported_workspace(cli, datafiles, workspace_cfg):
[
# Test loading version 4
(
- {"format-version": 4, "workspaces": {"alpha.bst": {"prepared": True, "path": "/workspaces/bravo"}},},
+ {"format-version": 4, "workspaces": {"alpha.bst": {"path": "/workspaces/bravo"}},},
{
"format-version": BST_WORKSPACE_FORMAT_VERSION,
- "workspaces": {"alpha.bst": {"prepared": True, "path": "/workspaces/bravo"}},
+ "workspaces": {"alpha.bst": {"path": "/workspaces/bravo"}},
},
),
],