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-28 18:50:40 +0100
commitd3a832f66e8802cb45536ff278d5c77f946d341d (patch)
tree6dd2af4a10014ace4db47b1515622960992f8454
parent016854946467909fe97b7b6f29c7b749098af6ad (diff)
downloadmeta-updater-d3a832f66e8802cb45536ff278d5c77f946d341d.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=""