From d32c6a371f90f3e63b96f81f28661786ffa6d5a8 Mon Sep 17 00:00:00 2001 From: Jim MacArthur Date: Thu, 10 Jan 2019 16:51:35 +0000 Subject: _sandboxremote.py: Create marked directories before running 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. --- buildstream/sandbox/_sandboxremote.py | 8 ++++++++ 1 file changed, 8 insertions(+) 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) -- cgit v1.2.1