summaryrefslogtreecommitdiff
path: root/buildstream/buildelement.py
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2017-03-15 23:18:58 +0900
committerTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2017-03-15 23:21:16 +0900
commitf626ee1368730650c76328496910583286b25840 (patch)
tree93171f43c8aa9900c8604e2a5ba4f05eb3a0ce54 /buildstream/buildelement.py
parent6032779b5fd2a3f99ff48e18c212ae12d6f757f9 (diff)
downloadbuildstream-f626ee1368730650c76328496910583286b25840.tar.gz
element.py: Added stage_dependencies() convenience function.
This iterates over the elements dependencies and stages them somewhere in a sandbox. This is especially interesting because of the added warnings it gives you about the file overlaps and ignored files which would otherwise overwrite non-empty directories. Also updated build and compose elements to use this in place of manually looping.
Diffstat (limited to 'buildstream/buildelement.py')
-rw-r--r--buildstream/buildelement.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/buildstream/buildelement.py b/buildstream/buildelement.py
index ac50b5fbb..c7a97e983 100644
--- a/buildstream/buildelement.py
+++ b/buildstream/buildelement.py
@@ -69,8 +69,7 @@ class BuildElement(Element):
# Stage deps in the sandbox root
with self.timed_activity("Staging dependencies", silent_nested=True):
- for dep in self.dependencies(Scope.BUILD):
- dep.stage(sandbox)
+ self.stage_dependencies(sandbox, Scope.BUILD)
# Run any integration commands provided by the dependencies
# once they are all staged and ready