diff options
author | Darius Makovsky <traveltissues@protonmail.com> | 2019-09-05 14:33:42 +0100 |
---|---|---|
committer | Darius Makovsky <traveltissues@protonmail.com> | 2019-09-12 15:35:18 +0100 |
commit | 5493d1abf6e508c1e93f3beddb947baeda9b4fd3 (patch) | |
tree | e1e2003b7ea626fca140d0fbb8497e7d7411314e | |
parent | ffa84e68bde1b0cb0b0db0d360a035d002ab73c5 (diff) | |
download | buildstream-5493d1abf6e508c1e93f3beddb947baeda9b4fd3.tar.gz |
element.py: remove workspaces in cache key calc
Using the workspace source plugin, workspaces should now be handled like
sources for the purpose of calculating element cache keys.
partially reverts !1470
works towards #1073
-rw-r--r-- | src/buildstream/element.py | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/src/buildstream/element.py b/src/buildstream/element.py index afef7121a..cf1ea2d86 100644 --- a/src/buildstream/element.py +++ b/src/buildstream/element.py @@ -1028,9 +1028,7 @@ class Element(Plugin): redundant_ref = source._load_ref() - # some sources don't have 'kind's - source_kind = source.__dict__['kind'] if 'kind' in list(source.__dict__) else str(None) - if source_kind == 'workspace': + if meta_source.kind == 'workspace': _workspace_source = source continue @@ -2215,15 +2213,8 @@ class Element(Plugin): return {'key': _source._get_unique_key(True), 'name': _source._get_source_name()} - def __get_workspace_entry(workspace): - return {'key': workspace.get_key()} - - if workspace is None: - self.__cache_key_dict['sources'] = \ - [__get_source_entry(s) for s in self.__sources] - else: - self.__cache_key_dict['sources'] = \ - [__get_workspace_entry(workspace)] + self.__cache_key_dict['sources'] = \ + [__get_source_entry(s) for s in self.__sources] self.__cache_key_dict['fatal-warnings'] = sorted(project._fatal_warnings) |