summaryrefslogtreecommitdiff
path: root/buildstream/_project.py
diff options
context:
space:
mode:
authorTristan Maat <tm@tlater.net>2018-03-16 13:34:38 +0000
committerTristan Maat <tm@tlater.net>2018-03-16 15:05:38 +0000
commit673a6b1206127a87ebe7c36e1db85b1d04089c65 (patch)
tree721d2000801234d84ddc9219ba768a34abb1648d /buildstream/_project.py
parent81ea9a80e666bae3cc7ebd9886d63dc18fd2f70a (diff)
downloadbuildstream-673a6b1206127a87ebe7c36e1db85b1d04089c65.tar.gz
_project.py: Add BST_WORKSPACE_FORMAT_VERSION
Diffstat (limited to 'buildstream/_project.py')
-rwxr-xr-xbuildstream/_project.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/buildstream/_project.py b/buildstream/_project.py
index 70c0a079f..f4a543b9d 100755
--- a/buildstream/_project.py
+++ b/buildstream/_project.py
@@ -40,6 +40,7 @@ from ._sourcefactory import SourceFactory
# to the `project.conf` format or the core element format.
#
BST_FORMAT_VERSION = 4
+BST_WORKSPACE_FORMAT_VERSION = 1
# The separator we use for user specified aliases
_ALIAS_SEPARATOR = ':'
@@ -489,17 +490,17 @@ class Project():
element: {"path": config}
for element, config in _yaml.node_items(self._workspaces)
if element != "version"}
- self._workspaces["version"] = 1
+ self._workspaces["version"] = BST_WORKSPACE_FORMAT_VERSION
needs_rewrite = True
- elif version == 1:
+ elif version == BST_WORKSPACE_FORMAT_VERSION:
pass
else:
raise LoadError(LoadErrorReason.INVALID_DATA,
"Workspace configuration format version {} not supported."
"Your version of buildstream may be too old. Max supported version: {}"
- .format(version, 1))
+ .format(version, BST_WORKSPACE_FORMAT_VERSION))
if needs_rewrite:
self._save_workspace_config()