diff options
author | Jürg Billeter <j@bitron.ch> | 2019-03-13 12:08:37 +0000 |
---|---|---|
committer | bst-marge-bot <marge-bot@buildstream.build> | 2019-03-27 16:24:32 +0000 |
commit | 954718fa02bdddb23f3753a7bfe1abe39d555e94 (patch) | |
tree | b620f75b4be8b47012770abe506145ad1429956c | |
parent | 0db007537ad217c22884c14e60b5e8bedf010e13 (diff) | |
download | buildstream-954718fa02bdddb23f3753a7bfe1abe39d555e94.tar.gz |
cascache.py: Add local_missing_blobs() method
-rw-r--r-- | buildstream/_cas/cascache.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/buildstream/_cas/cascache.py b/buildstream/_cas/cascache.py index bb5233813..ce51fb25e 100644 --- a/buildstream/_cas/cascache.py +++ b/buildstream/_cas/cascache.py @@ -679,6 +679,23 @@ class CASCache(): return missing_blobs.values() + # local_missing_blobs(): + # + # Check local cache for missing blobs. + # + # Args: + # digests (list): The Digests of blobs to check + # + # Returns: Missing Digest objects + # + def local_missing_blobs(self, digests): + missing_blobs = [] + for digest in digests: + objpath = self.objpath(digest) + if not os.path.exists(objpath): + missing_blobs.append(digest) + return missing_blobs + ################################################ # Local Private Methods # ################################################ |