summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim MacArthur <jim.macarthur@codethink.co.uk>2018-09-24 16:46:23 +0100
committerJim MacArthur <jim.macarthur@codethink.co.uk>2018-09-25 11:36:37 +0100
commit62f5938258154c8c5c68a5483ff58cadf8500884 (patch)
tree4cf802bcbcc4b1e34ac0a6b875777ed6ba59a849
parent2df7d14034688545955b9d85ebf3d92099b69eb8 (diff)
downloadbuildstream-jmac/stop-caching-vdirs.tar.gz
element.py/_assemble(): Call get_virtual_directory later.jmac/stop-caching-vdirs
-rw-r--r--buildstream/element.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/buildstream/element.py b/buildstream/element.py
index f9e3c191b..74deda384 100644
--- a/buildstream/element.py
+++ b/buildstream/element.py
@@ -1532,8 +1532,6 @@ class Element(Plugin):
with _signals.terminator(cleanup_rootdir), \
self.__sandbox(rootdir, output_file, output_file, self.__sandbox_config) as sandbox: # nopep8
- sandbox_vroot = sandbox.get_virtual_directory()
-
# By default, the dynamic public data is the same as the static public data.
# The plugin's assemble() method may modify this, though.
self.__dynamic_public = _yaml.node_copy(self.__public)
@@ -1581,7 +1579,6 @@ class Element(Plugin):
finally:
if collect is not None:
try:
- # Sandbox will probably have replaced its virtual directory, so get it again
sandbox_vroot = sandbox.get_virtual_directory()
collectvdir = sandbox_vroot.descend(collect.lstrip(os.sep).split(os.sep))
except VirtualDirectoryError:
@@ -1606,6 +1603,7 @@ class Element(Plugin):
collectvdir.export_files(filesdir, can_link=True)
try:
+ sandbox_vroot = sandbox.get_virtual_directory()
sandbox_build_dir = sandbox_vroot.descend(
self.get_variable('build-root').lstrip(os.sep).split(os.sep))
# Hard link files from build-root dir to buildtreedir directory