summaryrefslogtreecommitdiff
path: root/buildstream/source.py
diff options
context:
space:
mode:
Diffstat (limited to 'buildstream/source.py')
-rw-r--r--buildstream/source.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/buildstream/source.py b/buildstream/source.py
index 7a0a0ec88..9822beeec 100644
--- a/buildstream/source.py
+++ b/buildstream/source.py
@@ -982,9 +982,9 @@ class Source(Plugin):
#
def __ensure_previous_sources(self, previous_sources):
for index, src in enumerate(previous_sources):
+ # BuildStream should track sources in the order they appear so
+ # previous sources should never be in an inconsistent state
+ assert src.get_consistency() != Consistency.INCONSISTENT
+
if src.get_consistency() == Consistency.RESOLVED:
src._fetch(previous_sources[0:index])
- elif src.get_consistency() == Consistency.INCONSISTENT:
- new_ref = src._track(previous_sources[0:index])
- src._save_ref(new_ref)
- src._fetch(previous_sources[0:index])