summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2020-01-16 12:11:15 +0100
committerJürg Billeter <j@bitron.ch>2020-02-03 18:44:30 +0000
commit020b20cdd2b46f79d34cb6e178e58570a426bbca (patch)
tree0cb0e5ab93b3db99ca6a4c72a1f322553fc15425
parent5e169159ebf45cabaf168bdf8b0e3c9d1e019bb5 (diff)
downloadbuildstream-020b20cdd2b46f79d34cb6e178e58570a426bbca.tar.gz
_sandboxreapi.py: Do not create directories for host-files
This breaks if host-files is used to bind mount regular files.
-rw-r--r--src/buildstream/sandbox/_sandboxreapi.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/buildstream/sandbox/_sandboxreapi.py b/src/buildstream/sandbox/_sandboxreapi.py
index 2430fd372..f1cd477d6 100644
--- a/src/buildstream/sandbox/_sandboxreapi.py
+++ b/src/buildstream/sandbox/_sandboxreapi.py
@@ -59,8 +59,11 @@ class SandboxREAPI(Sandbox):
# Create directories for all marked directories. This emulates
# some of the behaviour of other sandboxes, which create these
# to use as mount points.
+ mount_sources = self._get_mount_sources()
for mark in self._get_marked_directories():
directory = mark["directory"]
+ if directory in mount_sources:
+ continue
# Create each marked directory
vdir.descend(*directory.split(os.path.sep), create=True)