summaryrefslogtreecommitdiff
path: root/buildstream/_loader/loader.py
diff options
context:
space:
mode:
Diffstat (limited to 'buildstream/_loader/loader.py')
-rw-r--r--buildstream/_loader/loader.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/buildstream/_loader/loader.py b/buildstream/_loader/loader.py
index 2efc4d360..71b74c506 100644
--- a/buildstream/_loader/loader.py
+++ b/buildstream/_loader/loader.py
@@ -540,11 +540,12 @@ class Loader():
#
if element._get_consistency() == Consistency.RESOLVED:
if fetch_subprojects:
- for source in element.sources():
+ sources = list(element.sources())
+ for idx, source in enumerate(sources):
if ticker:
ticker(filename, 'Fetching subproject from {} source'.format(source.get_kind()))
if source._get_consistency() != Consistency.CACHED:
- source._fetch()
+ source._fetch(sources[0:idx])
else:
detail = "Try fetching the project with `bst fetch {}`".format(filename)
raise LoadError(LoadErrorReason.SUBPROJECT_FETCH_NEEDED,