From f2a2c84b310ce6c7991be908b5770c7a7a03eac6 Mon Sep 17 00:00:00 2001 From: William Salmon Date: Tue, 4 Dec 2018 16:42:58 +0000 Subject: Basic options for shell --build to use buildtrees Fixes issue #740 --- buildstream/_stream.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'buildstream/_stream.py') diff --git a/buildstream/_stream.py b/buildstream/_stream.py index 04eb409a5..85ead3330 100644 --- a/buildstream/_stream.py +++ b/buildstream/_stream.py @@ -124,6 +124,7 @@ class Stream(): # mounts (list of HostMount): Additional directories to mount into the sandbox # isolate (bool): Whether to isolate the environment like we do in builds # command (list): An argv to launch in the sandbox, or None + # usebuildtree (bool): Wheather to use a buildtree as the source. # # Returns: # (int): The exit code of the launched shell @@ -132,7 +133,8 @@ class Stream(): directory=None, mounts=None, isolate=False, - command=None): + command=None, + usebuildtree=False): # Assert we have everything we need built, unless the directory is specified # in which case we just blindly trust the directory, using the element @@ -147,7 +149,8 @@ class Stream(): raise StreamError("Elements need to be built or downloaded before staging a shell environment", detail="\n".join(missing_deps)) - return element._shell(scope, directory, mounts=mounts, isolate=isolate, prompt=prompt, command=command) + return element._shell(scope, directory, mounts=mounts, isolate=isolate, prompt=prompt, command=command, + usebuildtree=usebuildtree) # build() # -- cgit v1.2.1