summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbst-marge-bot <marge-bot@buildstream.build>2020-08-30 08:29:55 +0000
committerbst-marge-bot <marge-bot@buildstream.build>2020-08-30 08:29:55 +0000
commitee927b2c03806da80b9dc09e24a937e886700071 (patch)
treeec502fb790b75c97280d218b3e5420bd4fdc12fe
parent718e60f771a406936ad8004a7422161241ef6eec (diff)
parentdf7e68a0ca18cb75c6bce589c45b94d788e917b0 (diff)
downloadbuildstream-ee927b2c03806da80b9dc09e24a937e886700071.tar.gz
Merge branch 'tristan/scriptelement-simplify' into 'master'
scriptelement.py: Simplify staging in the case no layout is provided See merge request BuildStream/buildstream!2049
-rw-r--r--src/buildstream/scriptelement.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/buildstream/scriptelement.py b/src/buildstream/scriptelement.py
index f8deff28e..e2b59cb4e 100644
--- a/src/buildstream/scriptelement.py
+++ b/src/buildstream/scriptelement.py
@@ -219,16 +219,16 @@ class ScriptElement(Element):
# Stage the elements, and run integration commands where appropriate.
if not self.__layout:
- # if no layout set, stage all dependencies into /
- for build_dep in self.dependencies(Scope.BUILD, recurse=False):
- with self.timed_activity("Staging {} at /".format(build_dep.name), silent_nested=True):
- build_dep.stage_dependency_artifacts(sandbox, Scope.RUN, path="/")
- with sandbox.batch(SandboxFlags.NONE):
- for build_dep in self.dependencies(Scope.BUILD, recurse=False):
- with self.timed_activity("Integrating {}".format(build_dep.name), silent_nested=True):
- for dep in build_dep.dependencies(Scope.RUN):
- dep.integrate(sandbox)
+ # if no layout set, stage all dependencies into the sandbox root
+ with self.timed_activity("Staging dependencies", silent_nested=True):
+ self.stage_dependency_artifacts(sandbox, Scope.BUILD)
+
+ # Run any integration commands provided by the dependencies
+ # once they are all staged and ready
+ with sandbox.batch(SandboxFlags.NONE, label="Integrating sandbox"):
+ for dep in self.dependencies(Scope.BUILD):
+ dep.integrate(sandbox)
else:
# If layout, follow its rules.
for item in self.__layout: