From c94f1264014b7bb4110949bf326c500919f5534a Mon Sep 17 00:00:00 2001 From: Tristan Van Berkom Date: Wed, 11 Apr 2018 22:11:11 +0900 Subject: 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. --- buildstream/source.py | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'buildstream/source.py') 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 -- cgit v1.2.1