diff options
author | Patrick Vacek <patrickvacek@gmail.com> | 2019-01-07 14:14:42 +0100 |
---|---|---|
committer | Patrick Vacek <patrickvacek@gmail.com> | 2019-01-07 14:14:42 +0100 |
commit | 03ed45db93f511ee5fbc766436d5330ca33bf278 (patch) | |
tree | 4758104b8ab71983b456a9142485642a40eb709e | |
parent | cb8aec948c6c667cb0b0ebffddd2bebda00c7080 (diff) | |
download | meta-updater-03ed45db93f511ee5fbc766436d5330ca33bf278.tar.gz |
image_garagesign: Use a lock to fix concurrency problems.fix/OTA-1866/simultaneous-garage-sign
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.bbclass | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/classes/image_types_ostree.bbclass b/classes/image_types_ostree.bbclass index 0820af7..5cb4d51 100644 --- a/classes/image_types_ostree.bbclass +++ b/classes/image_types_ostree.bbclass | |||
@@ -169,6 +169,9 @@ IMAGE_CMD_ostreepush () { | |||
169 | 169 | ||
170 | IMAGE_TYPEDEP_garagesign = "ostreepush" | 170 | IMAGE_TYPEDEP_garagesign = "ostreepush" |
171 | do_image_garagesign[depends] += "unzip-native:do_populate_sysroot" | 171 | do_image_garagesign[depends] += "unzip-native:do_populate_sysroot" |
172 | # This lock solves OTA-1866, which is that removing GARAGE_SIGN_REPO while using | ||
173 | # garage-sign simultaneously for two images often causes problems. | ||
174 | do_image_garagesign[lockfiles] += "${DEPLOY_DIR_IMAGE}/garagesign.lock" | ||
172 | IMAGE_CMD_garagesign () { | 175 | IMAGE_CMD_garagesign () { |
173 | if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then | 176 | if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then |
174 | # if credentials are issued by a server that doesn't support offline signing, exit silently | 177 | # if credentials are issued by a server that doesn't support offline signing, exit silently |