From b039761544600778a2a40e0f4f2f6caed2b450ee Mon Sep 17 00:00:00 2001 From: Christian Kellner Date: Thu, 17 Dec 2020 17:51:27 +0100 Subject: [PATCH] pipeline: identify tree objects during build Every time a stage has been successfully built, the contents of the tree now corresponds to the stage and can thus be identified via the id of the stage. When the tree is being written to, i.e. on consecutive attempts of stage builds, the `id` of the tree object will automatically be reset. --- osbuild/pipeline.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/osbuild/pipeline.py b/osbuild/pipeline.py index d884b279..e5deeed3 100644 --- a/osbuild/pipeline.py +++ b/osbuild/pipeline.py @@ -249,6 +249,10 @@ class Pipeline: results["success"] = False return results, None, None + # The content of the tree now corresponds to the stage that + # was build and this can can be identified via the id of it + tree.id = stage.id + if stage.checkpoint: object_store.commit(tree, stage.id)