You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by tv...@apache.org on 2021/02/04 07:11:37 UTC

[buildstream] 04/12: element: use BST_STAGE_INTEGRATES in prepare_sandbox and assemble

This is an automated email from the ASF dual-hosted git repository.

tvb pushed a commit to branch richardmaw/shell-multi-stage
in repository https://gitbox.apache.org/repos/asf/buildstream.git

commit 6b9a93fda6a35293c9885ef5d091c6efc23a4bd4
Author: Richard Maw <ri...@codethink.co.uk>
AuthorDate: Mon Oct 29 13:21:48 2018 +0000

    element: use BST_STAGE_INTEGRATES in prepare_sandbox and assemble
    
    This ensures Element.integrate_dependency_artifacts is called after stage
    when BST_STAGE_INTEGRATES hasn't been set to False.
---
 buildstream/element.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/buildstream/element.py b/buildstream/element.py
index 13140a1..35c305f 100644
--- a/buildstream/element.py
+++ b/buildstream/element.py
@@ -1395,6 +1395,8 @@ class Element(Plugin):
             if not directory:
                 if shell and scope == Scope.BUILD:
                     self.stage(sandbox)
+                    if not self.BST_STAGE_INTEGRATES:
+                        self.integrate_dependency_artifacts(sandbox, scope)
                 else:
                     # Stage deps in the sandbox root
                     with self.timed_activity("Staging dependencies", silent_nested=True):
@@ -1404,8 +1406,7 @@ class Element(Plugin):
                     # once they are all staged and ready
                     if integrate:
                         with self.timed_activity("Integrating sandbox"):
-                            for dep in self.dependencies(scope):
-                                dep.integrate(sandbox)
+                            self.integrate_dependency_artifacts(sandbox, scope)
 
             yield sandbox
 
@@ -1624,6 +1625,8 @@ class Element(Plugin):
                     self.__configure_sandbox(sandbox)
                     # Step 2 - Stage
                     self.stage(sandbox)
+                    if not self.BST_STAGE_INTEGRATES:
+                        self.integrate_dependency_artifacts(sandbox, Scope.BUILD)
 
                     if self.__batch_prepare_assemble:
                         cm = sandbox.batch(self.__batch_prepare_assemble_flags,