diff options
author | Jürg Billeter <j@bitron.ch> | 2020-08-04 16:54:40 +0200 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2020-08-06 07:10:28 +0200 |
commit | 10b0f00d0a71245b7e68cb4b86d9c4311ee3385e (patch) | |
tree | 7c9ac674ca7f8b15089031fe9c95bb467cbe4024 /src | |
parent | 6a84970155e69ca554453b56f5d6da3fa1710f31 (diff) | |
download | buildstream-10b0f00d0a71245b7e68cb4b86d9c4311ee3385e.tar.gz |
element.py: Drop `__has_all_sources_cached` instance variable
This is already cached in each `Source` object. As this method is not
called frequently, this extra caching layer is not needed.
Diffstat (limited to 'src')
-rw-r--r-- | src/buildstream/element.py | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/buildstream/element.py b/src/buildstream/element.py index 5782ae4af..bdc04a848 100644 --- a/src/buildstream/element.py +++ b/src/buildstream/element.py @@ -249,7 +249,6 @@ class Element(Plugin): self.__pull_done = False # Whether pull was attempted self.__cached_successfully = None # If the Element is known to be successfully cached self.__has_all_sources_in_source_cache = None # If the sources are known to be successfully cached - self.__has_all_sources_cached = False # Whether all sources have a local copy of their respective sources self.__splits = None # Resolved regex objects for computing split domains self.__whitelist_regex = None # Resolved regex object to check if file is allowed to overlap self.__tainted = None # Whether the artifact is tainted and should not be shared @@ -1699,8 +1698,6 @@ class Element(Plugin): # def _fetch_done(self, fetched_original): self.__has_all_sources_in_source_cache = True - if fetched_original: - self.__has_all_sources_cached = True for source in self.__sources: source._fetch_done(fetched_original) @@ -2147,9 +2144,7 @@ class Element(Plugin): # copy of their sources. # def _has_all_sources_cached(self): - if not self.__has_all_sources_cached: - self.__has_all_sources_cached = all(source._is_cached() for source in self.__sources) - return self.__has_all_sources_cached + return all(source._is_cached() for source in self.__sources) def _should_fetch(self, fetch_original=False): """ return bool of if we need to run the fetch stage for this element |