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:09 +0100
commitd340d139730e04cfa81455e2397eddbc72416704 (patch)
treeceefedefca1bca930ac3cf4c0de5124773d064b0
parent168dee76c552a7090e09625b174caf652465be5a (diff)
downloadmeta-updater-d340d139730e04cfa81455e2397eddbc72416704.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 5a17096..b884346 100644
--- a/classes/image_types_ostree.bbclass
+++ b/classes/image_types_ostree.bbclass
@@ -151,7 +151,7 @@ IMAGE_CMD_ostree () {
151 rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.rootfs.ostree.tar.bz2 151 rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.rootfs.ostree.tar.bz2
152 ln -s ${IMAGE_NAME}.rootfs.ostree.tar.bz2 ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.rootfs.ostree.tar.bz2 152 ln -s ${IMAGE_NAME}.rootfs.ostree.tar.bz2 ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.rootfs.ostree.tar.bz2
153 153
154 if [ ! -d ${OSTREE_REPO} ]; then 154 if ! ostree --repo=${OSTREE_REPO} refs 2>&1 > /dev/null; then
155 ostree --repo=${OSTREE_REPO} init --mode=archive-z2 155 ostree --repo=${OSTREE_REPO} init --mode=archive-z2
156 fi 156 fi
157 157