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-06-12 17:28:34 +0100
commit8307b5d98026d75c4e1a0e3faf56e6ea1301f004 (patch)
tree1016ed7164fef6ded2385d6ad1858520a590c5e6
parent8928f2eb4357abc4067bfd1cea4ff2aae93719e7 (diff)
downloadbuildstream-8307b5d98026d75c4e1a0e3faf56e6ea1301f004.tar.gz
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 84ab30ada..225236d48 100644
--- a/buildstream/sandbox/_mount.py
+++ b/buildstream/sandbox/_mount.py
@@ -33,7 +33,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 d18cb9ec0..dc1b47d74 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.