summaryrefslogtreecommitdiffstats
path: root/classes
diff options
context:
space:
mode:
authorLuka Pivk <luka.pivk@toradex.com>2018-10-11 20:31:40 +0200
committerLuka Pivk <luka.pivk@toradex.com>2018-10-24 18:15:21 +0200
commit2af450bc64021c2ebc2e82a59a209e56276bad4f (patch)
treea75e27d1a913cdb073acf6f8d8f29f848874e4b7 /classes
parent441c6527710005c0cc676ae3e688c8e63fe6ee7d (diff)
downloadmeta-updater-2af450bc64021c2ebc2e82a59a209e56276bad4f.tar.gz
Added support to automatically update ostree summary
Use OSTREE_UPDATE_SUMMARY to automatically update summary after committing to ostree repo Signed-off-by: Luka Pivk <luka.pivk@toradex.com>
Diffstat (limited to 'classes')
-rw-r--r--classes/image_types_ostree.bbclass7
1 files changed, 6 insertions, 1 deletions
diff --git a/classes/image_types_ostree.bbclass b/classes/image_types_ostree.bbclass
index af87e28..3bf2d0e 100644
--- a/classes/image_types_ostree.bbclass
+++ b/classes/image_types_ostree.bbclass
@@ -16,6 +16,7 @@ OSTREE_KERNEL ??= "${KERNEL_IMAGETYPE}"
16 16
17OSTREE_COMMIT_SUBJECT ??= "Commit-id: ${IMAGE_NAME}" 17OSTREE_COMMIT_SUBJECT ??= "Commit-id: ${IMAGE_NAME}"
18OSTREE_COMMIT_BODY ??= "" 18OSTREE_COMMIT_BODY ??= ""
19OSTREE_UPDATE_SUMMARY ??= "0"
19 20
20export SYSTEMD_USED = "${@oe.utils.ifelse(d.getVar('VIRTUAL-RUNTIME_init_manager', True) == 'systemd', 'true', '')}" 21export SYSTEMD_USED = "${@oe.utils.ifelse(d.getVar('VIRTUAL-RUNTIME_init_manager', True) == 'systemd', 'true', '')}"
21 22
@@ -165,7 +166,11 @@ IMAGE_CMD_ostree () {
165 --branch=${OSTREE_BRANCHNAME} \ 166 --branch=${OSTREE_BRANCHNAME} \
166 --subject="${OSTREE_COMMIT_SUBJECT}" \ 167 --subject="${OSTREE_COMMIT_SUBJECT}" \
167 --body="${OSTREE_COMMIT_BODY}" 168 --body="${OSTREE_COMMIT_BODY}"
168 169
170 if [ "${OSTREE_UPDATE_SUMMARY}" = "1" ]; then
171 ostree --repo=${OSTREE_REPO} summary -u
172 fi
173
169 rm -rf ${OSTREE_ROOTFS} 174 rm -rf ${OSTREE_ROOTFS}
170} 175}
171 176