summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim MacArthur <jim.macarthur@codethink.co.uk>2018-05-08 16:27:19 +0100
committerJim MacArthur <jim.macarthur@codethink.co.uk>2018-08-01 13:07:33 +0100
commit4e6a9049ff2913ba812068ea91d962d1d39ea61a (patch)
treee7634e01e012860fde26f7ea64f560d6b6ffaa9f
parenta8c71ba49b03a389f84a69402615b5e88feb77bd (diff)
downloadbuildstream-4e6a9049ff2913ba812068ea91d962d1d39ea61a.tar.gz
sandbox: Remove instances of get_directory
sandbox/_mount.py, sandbox/_sandboxbwrap.py: Remove instances of get_directory
-rw-r--r--buildstream/sandbox/_mount.py3
-rw-r--r--buildstream/sandbox/_sandboxbwrap.py4
2 files changed, 5 insertions, 2 deletions
diff --git a/buildstream/sandbox/_mount.py b/buildstream/sandbox/_mount.py
index 1540d9d4f..0f96a92b7 100644
--- a/buildstream/sandbox/_mount.py
+++ b/buildstream/sandbox/_mount.py
@@ -32,7 +32,8 @@ from .._fuse import SafeHardlinks
class Mount():
def __init__(self, sandbox, mount_point, safe_hardlinks):
scratch_directory = sandbox._get_scratch_directory()
- root_directory = sandbox.get_directory()
+ # Getting external_directory here is acceptable as we're part of the sandbox code.
+ root_directory = sandbox.get_virtual_directory().external_directory
self.mount_point = mount_point
self.safe_hardlinks = safe_hardlinks
diff --git a/buildstream/sandbox/_sandboxbwrap.py b/buildstream/sandbox/_sandboxbwrap.py
index 9ed677620..010e4791d 100644
--- a/buildstream/sandbox/_sandboxbwrap.py
+++ b/buildstream/sandbox/_sandboxbwrap.py
@@ -56,7 +56,9 @@ class SandboxBwrap(Sandbox):
def run(self, command, flags, *, cwd=None, env=None):
stdout, stderr = self._get_output()
- root_directory = self.get_directory()
+
+ # Allowable access to underlying storage as we're part of the sandbox
+ root_directory = self.get_virtual_directory().external_directory
# Fallback to the sandbox default settings for
# the cwd and env.