summaryrefslogtreecommitdiff
path: root/buildstream/element.py
diff options
context:
space:
mode:
Diffstat (limited to 'buildstream/element.py')
-rw-r--r--buildstream/element.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/buildstream/element.py b/buildstream/element.py
index 8c507b768..c652015e4 100644
--- a/buildstream/element.py
+++ b/buildstream/element.py
@@ -1993,12 +1993,8 @@ class Element(Plugin):
os.makedirs(context.builddir, exist_ok=True)
with utils._tempdir(dir=context.builddir, prefix='workspace-{}'
.format(self.normal_name)) as temp:
- last_source = None
for source in self.sources():
- last_source = source
-
- if last_source:
- last_source._init_workspace(temp)
+ source._init_workspace(temp)
# Now hardlink the files into the workspace target.
utils.link_files(temp, workspace.get_absolute_path())