summaryrefslogtreecommitdiff
path: root/buildstream/element.py
diff options
context:
space:
mode:
Diffstat (limited to 'buildstream/element.py')
-rw-r--r--buildstream/element.py26
1 files changed, 15 insertions, 11 deletions
diff --git a/buildstream/element.py b/buildstream/element.py
index 260762cf1..54b764eb9 100644
--- a/buildstream/element.py
+++ b/buildstream/element.py
@@ -434,7 +434,7 @@ class Element(Plugin):
visited=visited, recursed=True)
# Yeild self only at the end, after anything needed has been traversed
- if should_yield and (recurse or recursed) and (scope == Scope.ALL or scope == Scope.RUN):
+ if should_yield and (recurse or recursed) and scope != Scope.BUILD:
yield self
def search(self, scope, name):
@@ -1289,17 +1289,21 @@ class Element(Plugin):
if scope == Scope.BUILD:
self.stage(sandbox)
elif scope == Scope.RUN:
- # Stage deps in the sandbox root
if deps == 'run':
- with self.timed_activity("Staging dependencies", silent_nested=True):
- self.stage_dependency_artifacts(sandbox, scope)
-
- # Run any integration commands provided by the dependencies
- # once they are all staged and ready
- if integrate:
- with self.timed_activity("Integrating sandbox"):
- for dep in self.dependencies(scope):
- dep.integrate(sandbox)
+ dependency_scope = Scope.RUN
+ else:
+ dependency_scope = None
+
+ # Stage deps in the sandbox root
+ with self.timed_activity("Staging dependencies", silent_nested=True):
+ self.stage_dependency_artifacts(sandbox, dependency_scope)
+
+ # Run any integration commands provided by the dependencies
+ # once they are all staged and ready
+ if integrate:
+ with self.timed_activity("Integrating sandbox"):
+ for dep in self.dependencies(dependency_scope):
+ dep.integrate(sandbox)
yield sandbox