summaryrefslogtreecommitdiff
path: root/buildstream/source.py
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2018-04-11 22:11:11 +0900
committerTristan Van Berkom <tristan.van.berkom@gmail.com>2018-04-11 14:10:55 +0000
commitc94f1264014b7bb4110949bf326c500919f5534a (patch)
treeeb543eecff05d9bf9f9ad59d28db1d201ab96c5d /buildstream/source.py
parent6ad88ecb3b5b465c4542a8dfdfc39386632319d1 (diff)
downloadbuildstream-c94f1264014b7bb4110949bf326c500919f5534a.tar.gz
element.py, source.py: Cleanup how Source cache keys are calculated.
Recently after a refactor we kept the Source adding workspace keys to the source keys because, now clean this up to have the workspace key added directly in the Element cache key calculation. This breaks cache keys.
Diffstat (limited to 'buildstream/source.py')
-rw-r--r--buildstream/source.py13
1 files changed, 3 insertions, 10 deletions
diff --git a/buildstream/source.py b/buildstream/source.py
index 2c1b8445e..ac22a1a8e 100644
--- a/buildstream/source.py
+++ b/buildstream/source.py
@@ -360,20 +360,13 @@ class Source(Plugin):
# Wrapper for get_unique_key() api
#
# Args:
- # workspace_key: An alternative key to use instead of this
- # source's unique key
+ # include_source (bool): Whether to include the delegated source key
#
- # This adds any core attributes to the key and
- # also calculates something different if workspaces
- # are active.
- #
- def _get_unique_key(self, workspace_key=None):
+ def _get_unique_key(self, include_source):
key = {}
key['directory'] = self.__directory
- if workspace_key is not None:
- key['workspace'] = workspace_key
- else:
+ if include_source:
key['unique'] = self.get_unique_key()
return key