diff options
author | Tristan van Berkom <tristan@codethink.co.uk> | 2020-08-30 16:00:41 +0900 |
---|---|---|
committer | Tristan van Berkom <tristan@codethink.co.uk> | 2020-08-30 16:00:41 +0900 |
commit | df7e68a0ca18cb75c6bce589c45b94d788e917b0 (patch) | |
tree | ec502fb790b75c97280d218b3e5420bd4fdc12fe /src/buildstream | |
parent | 718e60f771a406936ad8004a7422161241ef6eec (diff) | |
download | buildstream-df7e68a0ca18cb75c6bce589c45b94d788e917b0.tar.gz |
scriptelement.py: Simplify staging in the case no layout is provided
Diffstat (limited to 'src/buildstream')
-rw-r--r-- | src/buildstream/scriptelement.py | 18 |
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: |