diff options
author | Raoul Hidalgo Charman <raoul.hidalgocharman@codethink.co.uk> | 2019-05-16 15:09:42 +0100 |
---|---|---|
committer | James Ennis <james.ennis@codethink.com> | 2019-05-17 07:33:15 +0000 |
commit | 220404db88b3fc5faae8cc14583ce5a89810cd52 (patch) | |
tree | a76a8c48c63e1ca25dd883e76381346e0fe13934 /buildstream | |
parent | 8a16aa6f7af238fb77e90c6f4e7d4f1457507b85 (diff) | |
download | buildstream-220404db88b3fc5faae8cc14583ce5a89810cd52.tar.gz |
element.py: fix init_workspace for multiple sourcesraoul/440-fix
Noticed a mistake that got into !1214, so only the last source
gets initialised in a workspace. Added a test for this.
Diffstat (limited to 'buildstream')
-rw-r--r-- | buildstream/element.py | 6 |
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()) |