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-20 09:36:18 +0100
commit0d5b1915b554ad9f56eb6244a6fe1b33e13c925a (patch)
tree974ee94caf2b43d4cba2bbb060009085a9fc86c6
parent66d44d98e6f612f2ccd87cbe0b0611cea8dbfe46 (diff)
downloadmeta-updater-0d5b1915b554ad9f56eb6244a6fe1b33e13c925a.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