This is an automated email from the ASF dual-hosted git repository. github-bot pushed a commit to branch jmac/googlecas_and_virtual_directories_1 in repository https://gitbox.apache.org/repos/asf/buildstream.git
commit d6059e51101acd15d6cf5bd4494a9f8aca6c0669 Author: Jim MacArthur <[email protected]> AuthorDate: Tue May 8 16:27:19 2018 +0100 sandbox/_mount.py, sandbox/_sandboxbwrap.py: Remove instances of get_directory --- buildstream/sandbox/_mount.py | 3 ++- buildstream/sandbox/_sandboxbwrap.py | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/buildstream/sandbox/_mount.py b/buildstream/sandbox/_mount.py index 84ab30a..225236d 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 d18cb9e..dc1b47d 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.
