summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Vacek <patrickvacek@gmail.com>2019-01-07 14:14:42 +0100
committerPatrick Vacek <patrickvacek@gmail.com>2019-02-14 17:50:49 +0100
commit8b3e297a4db6553705ffde14e2250c01cad822b9 (patch)
tree3e7c3904d01b98a436589e6850749872e15d184f
parent50ac567d929a1b6db99ab01196d0b4eda9f15aa8 (diff)
downloadmeta-updater-8b3e297a4db6553705ffde14e2250c01cad822b9.tar.gz
image_garagesign: Use a lock to fix concurrency problems.
We remove GARAGE_SIGN_REPO at the start and end of this task, which causes trouble if two images call this task at the same time. This probably could be fixed in a better fashion (like putting the repo in an image-specific subdirectory) but this is quick and easy, and the task usually doesn't take long to run, so the lack of parallelization is not a big loss. Signed-off-by: Patrick Vacek <patrickvacek@gmail.com>
-rw-r--r--classes/image_types_ostree.bbclass3
1 files changed, 3 insertions, 0 deletions
diff --git a/classes/image_types_ostree.bbclass b/classes/image_types_ostree.bbclass
index 9574521..97290ac 100644
--- a/classes/image_types_ostree.bbclass
+++ b/classes/image_types_ostree.bbclass
@@ -182,6 +182,9 @@ IMAGE_CMD_ostreepush () {
182 182
183IMAGE_TYPEDEP_garagesign = "ostreepush" 183IMAGE_TYPEDEP_garagesign = "ostreepush"
184do_image_garagesign[depends] += "unzip-native:do_populate_sysroot" 184do_image_garagesign[depends] += "unzip-native:do_populate_sysroot"
185# This lock solves OTA-1866, which is that removing GARAGE_SIGN_REPO while using
186# garage-sign simultaneously for two images often causes problems.
187do_image_garagesign[lockfiles] += "${DEPLOY_DIR_IMAGE}/garagesign.lock"
185IMAGE_CMD_garagesign () { 188IMAGE_CMD_garagesign () {
186 if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then 189 if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then
187 # if credentials are issued by a server that doesn't support offline signing, exit silently 190 # if credentials are issued by a server that doesn't support offline signing, exit silently