summaryrefslogtreecommitdiffstats
path: root/classes
diff options
context:
space:
mode:
authorPatrick Vacek <patrickvacek@gmail.com>2018-11-02 17:16:32 +0100
committerGitHub <noreply@github.com>2018-11-02 17:16:32 +0100
commitc684c3474cb580a8f58b8299e9e901440ebf56d0 (patch)
tree671b0b80565ca29bd97a63a87544bc50da6f6c10 /classes
parentb7cb6f35d5605a1e68470b5199586f8b541ddf62 (diff)
parent7dfa63e7ee47e23f41e1f0a5dce30cf642b95457 (diff)
downloadmeta-updater-c684c3474cb580a8f58b8299e9e901440ebf56d0.tar.gz
Merge pull request #421 from agners/master-toradex
classes: image_types_ostree: use locking during OSTree repo update
Diffstat (limited to 'classes')
-rw-r--r--classes/image_types_ostree.bbclass3
1 files changed, 2 insertions, 1 deletions
diff --git a/classes/image_types_ostree.bbclass b/classes/image_types_ostree.bbclass
index 74282ef..0db8e50 100644
--- a/classes/image_types_ostree.bbclass
+++ b/classes/image_types_ostree.bbclass
@@ -7,6 +7,7 @@ do_image_ostree[depends] += "ostree-native:do_populate_sysroot \
7 virtual/kernel:do_deploy \ 7 virtual/kernel:do_deploy \
8 ${INITRAMFS_IMAGE}:do_image_complete \ 8 ${INITRAMFS_IMAGE}:do_image_complete \
9" 9"
10do_image_ostree[lockfiles] += "${OSTREE_REPO}/ostree.lock"
10 11
11export OSTREE_REPO 12export OSTREE_REPO
12export OSTREE_BRANCHNAME 13export OSTREE_BRANCHNAME
@@ -155,7 +156,7 @@ IMAGE_CMD_ostree () {
155 rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.rootfs.ostree.tar.bz2 156 rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.rootfs.ostree.tar.bz2
156 ln -s ${IMAGE_NAME}.rootfs.ostree.tar.bz2 ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.rootfs.ostree.tar.bz2 157 ln -s ${IMAGE_NAME}.rootfs.ostree.tar.bz2 ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.rootfs.ostree.tar.bz2
157 158
158 if [ ! -d ${OSTREE_REPO} ]; then 159 if ! ostree --repo=${OSTREE_REPO} refs 2>&1 > /dev/null; then
159 ostree --repo=${OSTREE_REPO} init --mode=archive-z2 160 ostree --repo=${OSTREE_REPO} init --mode=archive-z2
160 fi 161 fi
161 162