diff options
author | Stefan Agner <stefan.agner@toradex.com> | 2020-01-28 22:05:14 +0000 |
---|---|---|
committer | Stefan Agner <stefan.agner@toradex.com> | 2020-01-28 22:07:13 +0000 |
commit | 65b51c44666af05be600c5c768293888a4437647 (patch) | |
tree | 2f18c0b0d4703fa64e6de3a35acc3df73ed2e431 | |
parent | f080cbbd1230dc4c371e15abc9bf1a77c8f1bb0f (diff) | |
download | meta-updater-pr/670.tar.gz |
image_types_ostree: set version metadata fieldpr/670
OSTree uses the "version" metadata field in various places, e.g. in
ostree admin status. Use DISTRO_VERSION as default version number
source. This gives a more human readable version number to a
particular OSTree:
$ ostree admin status
* torizon f1825d8a8f89c48cc0915ea059bd23463a97655757a53ae0ab0fe7a97e1ebeb2.0
Version: 3.0+snapshot-20200128
origin refspec: f1825d8a8f89c48cc0915ea059bd23463a97655757a53ae0ab0fe7a97e1ebeb
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
-rw-r--r-- | classes/image_types_ostree.bbclass | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/classes/image_types_ostree.bbclass b/classes/image_types_ostree.bbclass index f3f9c08..d32aae5 100644 --- a/classes/image_types_ostree.bbclass +++ b/classes/image_types_ostree.bbclass | |||
@@ -7,6 +7,7 @@ OSTREE_KERNEL ??= "${KERNEL_IMAGETYPE}" | |||
7 | OSTREE_ROOTFS ??= "${WORKDIR}/ostree-rootfs" | 7 | OSTREE_ROOTFS ??= "${WORKDIR}/ostree-rootfs" |
8 | OSTREE_COMMIT_SUBJECT ??= "Commit-id: ${IMAGE_NAME}" | 8 | OSTREE_COMMIT_SUBJECT ??= "Commit-id: ${IMAGE_NAME}" |
9 | OSTREE_COMMIT_BODY ??= "" | 9 | OSTREE_COMMIT_BODY ??= "" |
10 | OSTREE_COMMIT_VERSION ??= "${DISTRO_VERSION}" | ||
10 | OSTREE_UPDATE_SUMMARY ??= "0" | 11 | OSTREE_UPDATE_SUMMARY ??= "0" |
11 | OSTREE_DEPLOY_DEVICETREE ??= "0" | 12 | OSTREE_DEPLOY_DEVICETREE ??= "0" |
12 | 13 | ||
@@ -170,6 +171,7 @@ IMAGE_CMD_ostreecommit () { | |||
170 | --branch=${OSTREE_BRANCHNAME} \ | 171 | --branch=${OSTREE_BRANCHNAME} \ |
171 | --subject="${OSTREE_COMMIT_SUBJECT}" \ | 172 | --subject="${OSTREE_COMMIT_SUBJECT}" \ |
172 | --body="${OSTREE_COMMIT_BODY}" \ | 173 | --body="${OSTREE_COMMIT_BODY}" \ |
174 | --add-metadata-string=version="${OSTREE_COMMIT_VERSION}" \ | ||
173 | --bind-ref="${OSTREE_BRANCHNAME}-${IMAGE_BASENAME}" | 175 | --bind-ref="${OSTREE_BRANCHNAME}-${IMAGE_BASENAME}" |
174 | 176 | ||
175 | if [ "${OSTREE_UPDATE_SUMMARY}" = "1" ]; then | 177 | if [ "${OSTREE_UPDATE_SUMMARY}" = "1" ]; then |