summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim MacArthur <jim.macarthur@codethink.co.uk>2019-01-10 16:51:35 +0000
committerJürg Billeter <j@bitron.ch>2019-03-02 11:48:31 +0100
commitd32c6a371f90f3e63b96f81f28661786ffa6d5a8 (patch)
tree93fda75237c6a3c5f774540e52075996acd19c40
parent960b920d1b8947f7116783f4d91461d2df059628 (diff)
downloadbuildstream-jmac/make_marked_directories.tar.gz
_sandboxremote.py: Create marked directories before runningjmac/make_marked_directories
The other two sandboxes (BWrap and chroot) both do this because marked directories may be mount points. _cache_artifact requires install-root to be present, and existing BuildStream projects may rely on these too.
-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)