summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbst-marge-bot <marge-bot@buildstream.build>2019-03-02 11:37:00 +0000
committerbst-marge-bot <marge-bot@buildstream.build>2019-03-02 11:37:00 +0000
commitf7c3cf98ba83fe49f93867af3261f21f7a91e1ed (patch)
tree93fda75237c6a3c5f774540e52075996acd19c40
parent960b920d1b8947f7116783f4d91461d2df059628 (diff)
parentd32c6a371f90f3e63b96f81f28661786ffa6d5a8 (diff)
downloadbuildstream-f7c3cf98ba83fe49f93867af3261f21f7a91e1ed.tar.gz
Merge branch 'jmac/make_marked_directories' into 'master'
_sandboxremote.py: Create marked directories before running Closes #851 See merge request BuildStream/buildstream!1056
-rw-r--r--buildstream/sandbox/_sandboxremote.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/buildstream/sandbox/_sandboxremote.py b/buildstream/sandbox/_sandboxremote.py
index 38fc170f4..9ca4738be 100644
--- a/buildstream/sandbox/_sandboxremote.py
+++ b/buildstream/sandbox/_sandboxremote.py
@@ -311,6 +311,14 @@ class SandboxRemote(Sandbox):
upload_vdir = CasBasedDirectory(cascache)
upload_vdir.import_files(self.get_virtual_directory()._get_underlying_directory())
+ # Create directories for all marked directories. This emulates
+ # some of the behaviour of other sandboxes, which create these
+ # to use as mount points.
+ for mark in self._get_marked_directories():
+ directory = mark['directory']
+ # Create each marked directory
+ upload_vdir.descend(directory.split(os.path.sep), create=True)
+
# Generate action_digest first
input_root_digest = upload_vdir._get_digest()
command_proto = self._create_command(command, cwd, env)