summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Agner <stefan.agner@toradex.com>2018-11-02 10:46:38 +0100
committerPatrick Vacek <patrickvacek@gmail.com>2018-11-09 10:13:05 +0100
commit73b1502f82af33730ad9366436e156fba5e45834 (patch)
tree4e276db58a34041b7ec93640aff436ce46605f73
parent91060a9e63fd895595a4355b6df53a819b0b2879 (diff)
downloadmeta-updater-73b1502f82af33730ad9366436e156fba5e45834.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> Signed-off-by: Patrick Vacek <patrickvacek@gmail.com>
-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 819cc6d..550fd18 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