diff options
author | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2017-02-03 03:22:27 +0900 |
---|---|---|
committer | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2017-02-03 03:22:27 +0900 |
commit | d58eb21a2129a7a07d7e99f5b3f149b71021fa6c (patch) | |
tree | 48c9668514f80ff1072edc734ade29e62df8dbb0 /buildstream | |
parent | 93726549bc1e6ded5cee60fc40a255b3d36c490d (diff) | |
download | buildstream-d58eb21a2129a7a07d7e99f5b3f149b71021fa6c.tar.gz |
buildelement: Ensure build directory exists
Diffstat (limited to 'buildstream')
-rw-r--r-- | buildstream/buildelement.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/buildstream/buildelement.py b/buildstream/buildelement.py index 580f8dea3..b5f5e592d 100644 --- a/buildstream/buildelement.py +++ b/buildstream/buildelement.py @@ -22,6 +22,7 @@ implementing the most common case of element. """ +import os from . import Element, Scope, ElementError @@ -70,6 +71,12 @@ class BuildElement(Element): # Stage sources in /buildstream/build self.stage_sources(sandbox, '/buildstream/build') + # Create the build dir incase there is no sources staged + os.makedirs(os.path.join( + sandbox.executor.fs_root, + 'buildstream', + 'build'), exist_ok=True) + # And set the sandbox work directory too sandbox.set_cwd('/buildstream/build') |