summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMing Liu <liu.ming50@gmail.com>2021-01-18 12:47:55 +0100
committerMing Liu <liu.ming50@gmail.com>2021-01-30 13:26:47 +0100
commit0b2db6c1527b7b8114dbc97369e082338645623a (patch)
tree831a9161a229435cf8d3e1a3be31c6b45dc7a13c
parent17ee8a7741f4752c9dbb27885dd7cbdb2e3655ef (diff)
downloadmeta-updater-0b2db6c1527b7b8114dbc97369e082338645623a.tar.gz
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 <liu.ming50@gmail.com>
-rw-r--r--classes/image_types_ostree.bbclass1
1 files changed, 1 insertions, 0 deletions
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 () {
163 163
164IMAGE_TYPEDEP_ostreepush = "ostreecommit" 164IMAGE_TYPEDEP_ostreepush = "ostreecommit"
165do_image_ostreepush[depends] += "aktualizr-native:do_populate_sysroot ca-certificates-native:do_populate_sysroot" 165do_image_ostreepush[depends] += "aktualizr-native:do_populate_sysroot ca-certificates-native:do_populate_sysroot"
166do_image_ostreepush[lockfiles] += "${OSTREE_REPO}/ostree.lock"
166IMAGE_CMD_ostreepush () { 167IMAGE_CMD_ostreepush () {
167 # send a copy of the repo manifest to backend if available 168 # send a copy of the repo manifest to backend if available
168 local SEND_MANIFEST="" 169 local SEND_MANIFEST=""