summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarius Makovsky <traveltissues@protonmail.com>2019-09-05 14:34:15 +0100
committerDarius Makovsky <traveltissues@protonmail.com>2019-09-05 17:52:52 +0100
commitb03f1683572da9c6f7dd611074732cf42c06311a (patch)
tree11dce070f5e18f013e5c7fe1ea7dc6d20d179a30
parent7e1bd3a6b63932a3d81d8c2c3000b76efa154235 (diff)
downloadbuildstream-b03f1683572da9c6f7dd611074732cf42c06311a.tar.gz
workspace.py: support non-virtdir sources
The `workspace.init_workspace()` call should wrap `source._init_workspace` for held sources to support those sources not publishing `BST_VIRTUAL_DIRECTORY`
-rw-r--r--src/buildstream/plugins/sources/workspace.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/buildstream/plugins/sources/workspace.py b/src/buildstream/plugins/sources/workspace.py
index e4f34c211..2f7df6411 100644
--- a/src/buildstream/plugins/sources/workspace.py
+++ b/src/buildstream/plugins/sources/workspace.py
@@ -79,10 +79,12 @@ class WorkspaceSource(Source):
def init_workspace(self, directory):
# for each source held by the workspace we must call init_workspace
+ # those sources may override `init_workspace` expecting str or Directory
+ # and this will need to be extracted from the directory passed to this method
+ assert isinstance(directory, Directory)
+ directory = directory.external_directory
for source in self.get_element_sources():
- source.init_workspace(directory)
-
- ## FIXME the node needs reconfiguring for the workspace path where things are actually exported
+ source._init_workspace(directory)
def get_consistency(self):
if self.__source_digest is None: