summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2020-04-07 18:26:57 +0200
committerJürg Billeter <j@bitron.ch>2020-04-07 18:27:19 +0200
commit958ddebf9057f0e16f396589f62ace66e6e67f53 (patch)
treec6afbc0c954851308aaa0667117ef94972906ffc
parent2f9acf50abe8f776988ff8d90e90be6e80f866d7 (diff)
downloadbuildstream-juerg/public-data.tar.gz
_artifact.py: Use CASCache.contains_directory_and_blobs()juerg/public-data
-rw-r--r--src/buildstream/_artifact.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/buildstream/_artifact.py b/src/buildstream/_artifact.py
index 0e1355f34..10885f7dc 100644
--- a/src/buildstream/_artifact.py
+++ b/src/buildstream/_artifact.py
@@ -433,12 +433,10 @@ class Artifact:
require_files = context.require_artifact_files or self._element._artifact_files_required()
# Check whether 'files' subdirectory is available, with or without file contents
- if str(artifact.files) and not self._cas.contains_directory(artifact.files, with_files=require_files):
- self._cached = False
- return False
-
# Check whether public data is available
- if not self._cas.contains_file(artifact.public_data):
+ if not self._cas.contains_directory_and_blobs(
+ artifact.files, [artifact.public_data], with_files=require_files
+ ):
self._cached = False
return False