diff options
author | Tristan Maat <tristan.maat@codethink.co.uk> | 2019-10-23 17:30:05 +0100 |
---|---|---|
committer | Tristan Maat <tristan.maat@codethink.co.uk> | 2019-11-18 15:40:43 +0000 |
commit | b9ccb45fb1147dee740a4fcb7d3be06f1e5aead5 (patch) | |
tree | b50797d6e7cf987589818b3e46d0b03767470c6c | |
parent | 6bcaf12e944af3de2e10ca425aea7d79f7b8bca4 (diff) | |
download | buildstream-b9ccb45fb1147dee740a4fcb7d3be06f1e5aead5.tar.gz |
element.py: Remove `_update_state()`
-rw-r--r-- | src/buildstream/element.py | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/src/buildstream/element.py b/src/buildstream/element.py index ac734eacd..478dbdba6 100644 --- a/src/buildstream/element.py +++ b/src/buildstream/element.py @@ -1288,19 +1288,6 @@ class Element(Plugin): # our initialization anyway). self._update_source_state() - # _update_state() - # - # Keep track of element state. Calculate cache keys if possible and - # check whether artifacts are cached. - # - # This must be called whenever the state of an element may have changed. - # - def _update_state(self): - context = self._get_context() - - if not context.get_strict(): - self.__update_cache_key_non_strict() - # _get_display_key(): # # Returns cache keys for display purposes @@ -1626,7 +1613,7 @@ class Element(Plugin): # This would make the code less pretty, but it's a possible # optimization if we get desperate enough (and we will ;)). if not self.__should_schedule(): - self._update_state() + self.__update_cache_key_non_strict() return self.__assemble_scheduled = True @@ -1635,7 +1622,7 @@ class Element(Plugin): for dep in self.dependencies(Scope.BUILD, recurse=False): dep._set_required() - self._update_state() + self.__update_cache_key_non_strict() # _assemble_done(): # @@ -1656,7 +1643,7 @@ class Element(Plugin): if self.__artifact: self.__artifact.reset_cached() - self._update_state() + self.__update_cache_key_non_strict() self._update_ready_for_runtime_and_cached() if self._get_workspace() and self._cached_success(): |