summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Maw <jonathan.maw@codethink.co.uk>2019-05-16 16:05:07 +0100
committerJonathan Maw <jonathan.maw@codethink.co.uk>2019-05-17 13:57:25 +0100
commit574225a34603acb08bd8953a11c8b93700e57241 (patch)
tree3df8a3d878ba97c375911f5a88bcbcbe9aa97b1c
parent8a16aa6f7af238fb77e90c6f4e7d4f1457507b85 (diff)
downloadbuildstream-574225a34603acb08bd8953a11c8b93700e57241.tar.gz
element.py: Replace strong_cached with strict_cached
It always checks whether it's cached by the strict cache key, so it's misleading to call it strong_cached.
-rw-r--r--buildstream/element.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/buildstream/element.py b/buildstream/element.py
index 8c507b768..f82ff3626 100644
--- a/buildstream/element.py
+++ b/buildstream/element.py
@@ -216,7 +216,7 @@ class Element(Plugin):
self.__artifacts = context.artifactcache # Artifact cache
self.__sourcecache = context.sourcecache # Source cache
self.__consistency = Consistency.INCONSISTENT # Cached overall consistency state
- self.__strong_cached = None # Whether we have a cached artifact
+ self.__strict_cached = None # Whether we have a cached artifact
self.__weak_cached = None # Whether we have a cached artifact
self.__assemble_scheduled = False # Element is scheduled to be assembled
self.__assemble_done = False # Element is assembled
@@ -1789,12 +1789,12 @@ class Element(Plugin):
# in user context, as to complete a partial artifact
pull_buildtrees = self._get_context().pull_buildtrees
- if self.__strong_cached and pull_buildtrees:
+ if self.__strict_cached and pull_buildtrees:
# If we've specified a subdir, check if the subdir is cached locally
# or if it's possible to get
if self._cached_buildtree() or not self._buildtree_exists():
return False
- elif self.__strong_cached:
+ elif self.__strict_cached:
return False
# Pull is pending if artifact remote server available
@@ -2308,7 +2308,7 @@ class Element(Plugin):
if keystrength is None:
keystrength = _KeyStrength.STRONG if self._get_context().get_strict() else _KeyStrength.WEAK
- return self.__strong_cached if keystrength == _KeyStrength.STRONG else self.__weak_cached
+ return self.__strict_cached if keystrength == _KeyStrength.STRONG else self.__weak_cached
# __assert_cached()
#
@@ -2883,7 +2883,7 @@ class Element(Plugin):
self.__artifact = None
self.__strict_artifact = None
self.__weak_cached = None
- self.__strong_cached = None
+ self.__strict_cached = None
# __update_cache_keys()
#
@@ -2967,12 +2967,12 @@ class Element(Plugin):
self.__artifact = self.__strict_artifact
# Query caches now that the weak and strict cache keys are available.
- # strong_cached in non-strict mode is only of relevance when querying
- # if a 'better' artifact could be pulled, which is redudant if we already
- # have it cached locally with a strict_key. As such strong_cached is only
+ # strict_cached in non-strict mode is only of relevance when querying
+ # if a 'better' artifact could be pulled, which is redundant if we already
+ # have it cached locally with a strict_key. As such strict_cached is only
# checked against the 'strict' artifact.
- if not self.__strong_cached:
- self.__strong_cached = self.__strict_artifact.cached()
+ if not self.__strict_cached:
+ self.__strict_cached = self.__strict_artifact.cached()
if not self.__weak_cached and not context.get_strict():
self.__weak_cached = self.__artifact.cached()