diff options
author | Jim MacArthur <jim.macarthur@codethink.co.uk> | 2018-12-06 12:21:15 +0000 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2019-02-18 08:10:50 +0100 |
commit | f6466b8e4869aacc1c9bc541df646186a4f36a18 (patch) | |
tree | 71a257bfa544125d0432640ebd627a5b2ffc3e4f /buildstream/_artifactcache.py | |
parent | d48c780e838557f6ce5ec5d310c9745f907856f9 (diff) | |
download | buildstream-jmac/cache_artifacts_with_vdir.tar.gz |
element.py: Alter _cache_artifact to use CasBasedDirectoryjmac/cache_artifacts_with_vdir
Diffstat (limited to 'buildstream/_artifactcache.py')
-rw-r--r-- | buildstream/_artifactcache.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/buildstream/_artifactcache.py b/buildstream/_artifactcache.py index bc0032bec..b72b20fda 100644 --- a/buildstream/_artifactcache.py +++ b/buildstream/_artifactcache.py @@ -588,13 +588,16 @@ class ArtifactCache(): # # Args: # element (Element): The Element commit an artifact for - # content (str): The element's content directory + # content (Directory): The element's content directory # keys (list): The cache keys to use # def commit(self, element, content, keys): refs = [element.get_artifact_name(key) for key in keys] - self.cas.commit(refs, content) + tree = content._get_digest() + + for ref in refs: + self.cas.set_ref(ref, tree) # diff(): # |