summaryrefslogtreecommitdiffstats
path: root/classes
diff options
context:
space:
mode:
authorRicardo Salveti <ricardo@opensourcefoundries.com>2018-04-12 15:31:24 -0300
committerLaurent Bonnans <laurent.bonnans@here.com>2018-05-16 11:20:31 +0200
commitbbbf1fa8d4fb4c806f08ffc09c9b2c57053d456b (patch)
tree378814f6df03fd2cc8be5a20f134c066f0bded47 /classes
parent2d17b5661df26393654aee32b54e63cc0cf0a48e (diff)
downloadmeta-updater-bbbf1fa8d4fb4c806f08ffc09c9b2c57053d456b.tar.gz
Check for custom target version for installed_versions
Make sure to use the custom target version when creating installed_versions if defined by the user. Signed-off-by: Ricardo Salveti <ricardo@opensourcefoundries.com>
Diffstat (limited to 'classes')
-rw-r--r--classes/image_types_ota.bbclass6
1 files changed, 5 insertions, 1 deletions
diff --git a/classes/image_types_ota.bbclass b/classes/image_types_ota.bbclass
index b2643a7..9581971 100644
--- a/classes/image_types_ota.bbclass
+++ b/classes/image_types_ota.bbclass
@@ -107,7 +107,11 @@ IMAGE_CMD_otaimg () {
107 # Ensure that /var/local exists (AGL symlinks /usr/local to /var/local) 107 # Ensure that /var/local exists (AGL symlinks /usr/local to /var/local)
108 install -d ${PHYS_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/local 108 install -d ${PHYS_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/local
109 # Set package version for the first deployment 109 # Set package version for the first deployment
110 echo "{\"${ostree_target_hash}\":\"${GARAGE_TARGET_NAME}-${ostree_target_hash}\"}" > ${PHYS_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/sota/installed_versions 110 target_version=${ostree_target_hash}
111 if [ -n "${GARAGE_TARGET_VERSION}" ]; then
112 target_version=${GARAGE_TARGET_VERSION}
113 fi
114 echo "{\"${ostree_target_hash}\":\"${GARAGE_TARGET_NAME}-${target_version}\"}" > ${PHYS_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/sota/installed_versions
111 115
112 rm -rf ${HOME_TMP} 116 rm -rf ${HOME_TMP}
113 117