You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by gi...@apache.org on 2020/12/29 13:23:36 UTC

[buildstream] 03/03: _artifactcache: Fix pull in non-strict mode

This is an automated email from the ASF dual-hosted git repository.

github-bot pushed a commit to branch bst-push
in repository https://gitbox.apache.org/repos/asf/buildstream.git

commit 4d93c9b01a1a0b5d1ef888b0a1c1ecb160c0c93d
Author: Jürg Billeter <j...@bitron.ch>
AuthorDate: Tue Aug 1 16:57:04 2017 +0100

    _artifactcache: Fix pull in non-strict mode
    
    Strong ref was not created.
---
 buildstream/_artifactcache/artifactcache.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/buildstream/_artifactcache/artifactcache.py b/buildstream/_artifactcache/artifactcache.py
index a7208e8..4ebc798 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: