From d3a832f66e8802cb45536ff278d5c77f946d341d Mon Sep 17 00:00:00 2001 From: Ming Liu Date: Mon, 18 Jan 2021 12:47:55 +0100 Subject: image_types_ostree.bbclass: get lock before accessing OSTREE_REPO In commit d13ec585ae677affd88b9d92c6ea135cc249b2fa: [ image_types_ostree: use OSTree repo location for lockfiles ] A lockfile ${OSTREE_REPO}/ostree.lock was added to prevent concurrent access to the repository by multiple bitbake instances, but it should not only apply to ostreecommit task, but ostreepush task also need it. This fixes a following race condition error: | | ERROR: Execution of '.../temp/run.do_image_ostreecommit.34262' failed with exit code 1: | error: Writing content object: Creating temp file: No such file or directory Signed-off-by: Ming Liu --- classes/image_types_ostree.bbclass | 1 + 1 file changed, 1 insertion(+) diff --git a/classes/image_types_ostree.bbclass b/classes/image_types_ostree.bbclass index e66956a..4d9b0a9 100644 --- a/classes/image_types_ostree.bbclass +++ b/classes/image_types_ostree.bbclass @@ -163,6 +163,7 @@ IMAGE_CMD_ostreecommit () { IMAGE_TYPEDEP_ostreepush = "ostreecommit" do_image_ostreepush[depends] += "aktualizr-native:do_populate_sysroot ca-certificates-native:do_populate_sysroot" +do_image_ostreepush[lockfiles] += "${OSTREE_REPO}/ostree.lock" IMAGE_CMD_ostreepush () { # send a copy of the repo manifest to backend if available local SEND_MANIFEST="" -- cgit v1.2.3-54-g00ecf