summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2017-08-01 16:57:04 +0100
committerJürg Billeter <j@bitron.ch>2017-08-02 11:29:07 +0100
commit572967bf67bbaa46deb8be63be702407374f8a5b (patch)
treeb73d9a7f36b7abde1c46a7f3e9235779104119fe
parentbb215e834964b92a3a7baa943259dbb4f1094617 (diff)
downloadbuildstream-572967bf67bbaa46deb8be63be702407374f8a5b.tar.gz
_artifactcache: Fix pull in non-strict mode
Strong ref was not created.
-rw-r--r--buildstream/_artifactcache/artifactcache.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/buildstream/_artifactcache/artifactcache.py b/buildstream/_artifactcache/artifactcache.py
index a7208e8f2..4ebc79848 100644
--- a/buildstream/_artifactcache/artifactcache.py
+++ b/buildstream/_artifactcache/artifactcache.py
@@ -277,13 +277,13 @@ class ArtifactCache():
_ostree.fetch(self.repo, remote=remote,
ref=weak_ref, progress=progress)
+ # resolve weak_ref to checksum
+ rev = _ostree.checksum(self.repo, weak_ref)
+
# extract strong cache key from this newly fetched artifact
element._cached(recalculate=True)
ref = buildref(element, element._get_cache_key_from_artifact())
- # resolve ref to checksum
- rev = _ostree.checksum(self.repo, ref)
-
# create tag for strong cache key
_ostree.set_ref(self.repo, ref, rev)
else: