summaryrefslogtreecommitdiff
path: root/buildstream/sandbox
diff options
context:
space:
mode:
authorJim MacArthur <jim.macarthur@codethink.co.uk>2018-06-04 10:19:55 +0100
committerJim MacArthur <jim.macarthur@codethink.co.uk>2018-08-15 15:33:05 +0100
commit88ccff6e811320e3e77510db5179c570e6ec0995 (patch)
treee183de4ec8398861e0eba0ef848f3e54696804b1 /buildstream/sandbox
parent007624429f22972a9d2d2620cbbbad18411ff4c9 (diff)
downloadbuildstream-88ccff6e811320e3e77510db5179c570e6ec0995.tar.gz
Convert uses of external_directory to get_underlying_directory()
Diffstat (limited to 'buildstream/sandbox')
-rw-r--r--buildstream/sandbox/_mount.py6
-rw-r--r--buildstream/sandbox/_sandboxbwrap.py2
2 files changed, 5 insertions, 3 deletions
diff --git a/buildstream/sandbox/_mount.py b/buildstream/sandbox/_mount.py
index 0f96a92b7..49068fe92 100644
--- a/buildstream/sandbox/_mount.py
+++ b/buildstream/sandbox/_mount.py
@@ -32,8 +32,10 @@ from .._fuse import SafeHardlinks
class Mount():
def __init__(self, sandbox, mount_point, safe_hardlinks):
scratch_directory = sandbox._get_scratch_directory()
- # Getting external_directory here is acceptable as we're part of the sandbox code.
- root_directory = sandbox.get_virtual_directory().external_directory
+ # Getting _get_underlying_directory() here is acceptable as
+ # we're part of the sandbox code. This will fail if our
+ # directory is CAS-based.
+ root_directory = sandbox.get_virtual_directory()._get_underlying_directory()
self.mount_point = mount_point
self.safe_hardlinks = safe_hardlinks
diff --git a/buildstream/sandbox/_sandboxbwrap.py b/buildstream/sandbox/_sandboxbwrap.py
index 3ef3d4cb9..efec3748d 100644
--- a/buildstream/sandbox/_sandboxbwrap.py
+++ b/buildstream/sandbox/_sandboxbwrap.py
@@ -58,7 +58,7 @@ class SandboxBwrap(Sandbox):
stdout, stderr = self._get_output()
# Allowable access to underlying storage as we're part of the sandbox
- root_directory = self.get_virtual_directory().external_directory
+ root_directory = self.get_virtual_directory()._get_underlying_directory()
# Fallback to the sandbox default settings for
# the cwd and env.