summaryrefslogtreecommitdiffstats
path: root/classes
diff options
context:
space:
mode:
authorStefan Agner <stefan.agner@toradex.com>2018-11-02 10:46:38 +0100
committerStefan Agner <stefan.agner@toradex.com>2018-11-02 10:49:42 +0100
commitf2cf964b132f0ab462264daaf017a9a533dbd667 (patch)
tree680f98470a1cba9fe80d45606836f4293440a97b /classes
parentb4754d39d6eebc624b1380d9ce5097bc597f5a44 (diff)
downloadmeta-updater-f2cf964b132f0ab462264daaf017a9a533dbd667.tar.gz
classes: image_types_ostree: check OSTree repo existence using ostree
Currently we assume if the OSTree repo exists, that there is a OSTree repo in it. This does not need to be true in general, and when using lockfiles bitbake will create the directory before the do_image_ostree task is executed the first time. Use ostree refs to detect whether the target directory contains a OSTree repo. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Diffstat (limited to 'classes')
-rw-r--r--classes/image_types_ostree.bbclass2
1 files changed, 1 insertions, 1 deletions
diff --git a/classes/image_types_ostree.bbclass b/classes/image_types_ostree.bbclass
index 3bf2d0e..d74b7ae 100644
--- a/classes/image_types_ostree.bbclass
+++ b/classes/image_types_ostree.bbclass
@@ -155,7 +155,7 @@ IMAGE_CMD_ostree () {
155 rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.rootfs.ostree.tar.bz2 155 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 156 ln -s ${IMAGE_NAME}.rootfs.ostree.tar.bz2 ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.rootfs.ostree.tar.bz2
157 157
158 if [ ! -d ${OSTREE_REPO} ]; then 158 if ! ostree --repo=${OSTREE_REPO} refs 2>&1 > /dev/null; then
159 ostree --repo=${OSTREE_REPO} init --mode=archive-z2 159 ostree --repo=${OSTREE_REPO} init --mode=archive-z2
160 fi 160 fi
161 161