summaryrefslogtreecommitdiff
path: root/buildstream/element.py
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2019-03-28 11:01:18 +0100
committerJürg Billeter <j@bitron.ch>2019-04-12 11:17:33 +0200
commit6168faf1a8bc66994c8f5b67ea2871f596451416 (patch)
treeba9feb694d9ed3cf2429a44bade1a817c48badb7 /buildstream/element.py
parent4823256b66a97b2136b83ab6aa0ae4850d99b266 (diff)
downloadbuildstream-6168faf1a8bc66994c8f5b67ea2871f596451416.tar.gz
element.py: Do not pull file contents if not required
Diffstat (limited to 'buildstream/element.py')
-rw-r--r--buildstream/element.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/buildstream/element.py b/buildstream/element.py
index d4c4aa0b1..b63cc3a4f 100644
--- a/buildstream/element.py
+++ b/buildstream/element.py
@@ -2983,6 +2983,11 @@ class Element(Plugin):
subdir = "buildtree"
excluded_subdirs.remove(subdir)
+ # If file contents are not required for this element, don't pull them.
+ # The directories themselves will always be pulled.
+ if not context.require_artifact_files and not self._artifact_files_required():
+ excluded_subdirs.append("files")
+
return (subdir, excluded_subdirs)
# __cache_sources():