stage: include inputs in id calculation

Include all inputs of a stage during the calculation of its id,
since they determine, very much like options, the content the
stage produces; thus different inputs should lead to different
ids.
This commit is contained in:
Christian Kellner 2021-01-21 18:11:36 +00:00
parent 684c408914
commit 0fba88d7a9

View file

@ -53,6 +53,9 @@ class Stage:
m.update(json.dumps(self.build, sort_keys=True).encode())
m.update(json.dumps(self.base, sort_keys=True).encode())
m.update(json.dumps(self.options, sort_keys=True).encode())
if self.inputs:
data = {n: i.id for n, i in self.inputs.items()}
m.update(json.dumps(data, sort_keys=True).encode())
return m.hexdigest()
def run(self, tree, runner, build_tree, store, monitor, libdir):