osbuild: fix stages caching

We have never tried to reuse the first stage due to fact that range in for loop didn't include zero index. This commit fixes it.
This commit is contained in:
Ondřej Budai 2019-09-03 16:34:17 +02:00 committed by Tom Gundersen
parent 9f5f4ebfa6
commit cf046fcaeb

View file

@ -200,7 +200,7 @@ class Pipeline:
# that as the base.
base = None
base_idx = -1
for i in range(len(self.stages) - 1, 0, -1):
for i in reversed(range(len(self.stages))):
if object_store.has_tree(self.stages[i].id):
base = self.stages[i].id
base_idx = i