From ba2aba842448aad4cd04901be4b12a740662c908 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Billeter?= Date: Tue, 12 Nov 2019 08:13:38 +0100 Subject: _sandboxreapi.py: Ensure /dev, /proc and /tmp exist in sandbox --- src/buildstream/sandbox/_sandboxreapi.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/buildstream/sandbox') diff --git a/src/buildstream/sandbox/_sandboxreapi.py b/src/buildstream/sandbox/_sandboxreapi.py index 65f2eaeae..d2cd1b3bc 100644 --- a/src/buildstream/sandbox/_sandboxreapi.py +++ b/src/buildstream/sandbox/_sandboxreapi.py @@ -53,6 +53,10 @@ class SandboxREAPI(Sandbox): assert cwd.startswith("/") vdir.descend(*cwd[1:].split(os.path.sep), create=True) + # Ensure directories required for sandboxed execution exist + for directory in ["dev", "proc", "tmp"]: + vdir.descend(directory, create=True) + # Create directories for all marked directories. This emulates # some of the behaviour of other sandboxes, which create these # to use as mount points. -- cgit v1.2.1