summaryrefslogtreecommitdiff
path: root/buildstream/element.py
diff options
context:
space:
mode:
authorPhillip Smyth <phillipsmyth@Nexus-x240.dyn.ducie.codethink.co.uk>2018-07-16 07:27:15 +0100
committerPhillip Smyth <phillip.smyth@codethink.co.uk>2018-07-17 12:53:55 +0000
commit7e9282c97a7f940b9882154ccc6164a7f2268da8 (patch)
treef8c53e9677165f6b3c6424f52028714ac78d5f7c /buildstream/element.py
parentf770ab1c789aa6c4ff88ee2045a3a9207ed1f27f (diff)
downloadbuildstream-7e9282c97a7f940b9882154ccc6164a7f2268da8.tar.gz
buildstream/_frontend/cli.py: Added a `--deps` flag to `bst checkout`
buildstream/_stream.py: Added deps param to _prepare_sandbox function call buildstream/element.py: Added deps param and logic to _prepare_sandbox function
Diffstat (limited to 'buildstream/element.py')
-rw-r--r--buildstream/element.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/buildstream/element.py b/buildstream/element.py
index 04ee76a15..0f0bf49d6 100644
--- a/buildstream/element.py
+++ b/buildstream/element.py
@@ -1242,8 +1242,7 @@ class Element(Plugin):
# is used to stage things by the `bst checkout` codepath
#
@contextmanager
- def _prepare_sandbox(self, scope, directory, integrate=True):
-
+ def _prepare_sandbox(self, scope, directory, deps='run', integrate=True):
with self.__sandbox(directory, config=self.__sandbox_config) as sandbox:
# Configure always comes first, and we need it.
@@ -1255,15 +1254,16 @@ class Element(Plugin):
self.stage(sandbox)
elif scope == Scope.RUN:
# Stage deps in the sandbox root
- 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)
+ 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)
yield sandbox