pipeline: set source_epoch for tree

This will lead to all mtimes that are newer than the creation time
of `tree` being clamped to `source_epoch`, if that was specified
for the pipeline. Specifically it means that all files that were
created during the build will be clamped to it. This should make
builds more reproducible.
This commit is contained in:
Christian Kellner 2022-12-14 13:34:27 +01:00 committed by Tom Gundersen
parent 15dc8b7a00
commit 6c0183da21

View file

@ -319,6 +319,7 @@ class Pipeline:
# an intermediate checkpoint exists: Find the last stage that
# already exists in the store and use that as the base.
tree = object_store.new(self.id)
tree.source_epoch = self.source_epoch
todo = collections.deque()
for stage in reversed(self.stages):