summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2017-10-27 21:19:01 +0900
committerTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2017-10-27 21:19:01 +0900
commitefca70a9eb184416f79b1a85fe2b88a4e1814af9 (patch)
treef3758328985c5a2a4ea5105f525b78874ec9edec
parent92a7533fe0503ddbef68ed663a611f8b79d36deb (diff)
downloadbuildstream-efca70a9eb184416f79b1a85fe2b88a4e1814af9.tar.gz
_artifactcache: Adapt to new Element api _get_strict()
-rw-r--r--buildstream/_artifactcache/ostreecache.py6
-rw-r--r--buildstream/_artifactcache/tarcache.py2
2 files changed, 4 insertions, 4 deletions
diff --git a/buildstream/_artifactcache/ostreecache.py b/buildstream/_artifactcache/ostreecache.py
index 48788f4b9..079cf95cf 100644
--- a/buildstream/_artifactcache/ostreecache.py
+++ b/buildstream/_artifactcache/ostreecache.py
@@ -88,7 +88,7 @@ class OSTreeCache(ArtifactCache):
#
def contains(self, element, strength=None):
if strength is None:
- strength = _KeyStrength.STRONG if self.context.strict_build_plan else _KeyStrength.WEAK
+ strength = _KeyStrength.STRONG if element._get_strict() else _KeyStrength.WEAK
key = element._get_cache_key(strength)
if not key:
@@ -128,7 +128,7 @@ class OSTreeCache(ArtifactCache):
#
def remote_contains(self, element, strength=None):
if strength is None:
- strength = _KeyStrength.STRONG if self.context.strict_build_plan else _KeyStrength.WEAK
+ strength = _KeyStrength.STRONG if element._get_strict() else _KeyStrength.WEAK
key = element._get_cache_key(strength)
if not key:
@@ -160,7 +160,7 @@ class OSTreeCache(ArtifactCache):
# resolve weak cache key, if artifact is missing for strong cache key
# and the context allows use of weak cache keys
- if not rev and not self.context.strict_build_plan:
+ if not rev and not element._get_strict():
ref = buildref(element, element._get_cache_key(strength=_KeyStrength.WEAK))
rev = _ostree.checksum(self.repo, ref)
diff --git a/buildstream/_artifactcache/tarcache.py b/buildstream/_artifactcache/tarcache.py
index 56e3edd6c..74ba0b3a0 100644
--- a/buildstream/_artifactcache/tarcache.py
+++ b/buildstream/_artifactcache/tarcache.py
@@ -251,7 +251,7 @@ class TarCache(ArtifactCache):
#
def contains(self, element, strength=None):
if strength is None:
- strength = _KeyStrength.STRONG if self.context.strict_build_plan else _KeyStrength.WEAK
+ strength = _KeyStrength.STRONG if element._get_strict() else _KeyStrength.WEAK
key = element._get_cache_key(strength)