diff options
author | Abderrahim Kitouni <akitouni@gnome.org> | 2020-03-25 17:22:24 +0100 |
---|---|---|
committer | bst-marge-bot <marge-bot@buildstream.build> | 2020-04-08 12:32:58 +0000 |
commit | d3e32297814fa7e3f9b4aede4b9ecb83abea00c2 (patch) | |
tree | 711f1deda68221873b03314118282ce2f7ef60af | |
parent | a4738ec6ecc336b179390235b05c51490dfdf764 (diff) | |
download | buildstream-abderrahim/public-data.tar.gz |
cascache.py: use buildbox-casd when checking whether a file is cachedabderrahim/public-data
this lets buildbox-casd know it is needed and not delete it when pruning
-rw-r--r-- | src/buildstream/_cas/cascache.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/buildstream/_cas/cascache.py b/src/buildstream/_cas/cascache.py index 48b700c68..03be75c72 100644 --- a/src/buildstream/_cas/cascache.py +++ b/src/buildstream/_cas/cascache.py @@ -175,7 +175,13 @@ class CASCache: # Returns: True if the file is in the cache, False otherwise # def contains_file(self, digest): - return os.path.exists(self.objpath(digest)) + cas = self.get_cas() + + request = remote_execution_pb2.FindMissingBlobsRequest() + request.blob_digests.append(digest) + + response = cas.FindMissingBlobs(request) + return len(response.missing_blob_digests) == 0 # contains_directory(): # |