summaryrefslogtreecommitdiffstats
path: root/classes
diff options
context:
space:
mode:
authorlbonn <lbonn@users.noreply.github.com>2018-09-27 11:39:06 +0200
committerGitHub <noreply@github.com>2018-09-27 11:39:06 +0200
commita8a112afae60ceec1a2108b8717e9a7bf8080e87 (patch)
tree4ceb8f201ad480219950f1383c933ce1b73f0a4d /classes
parentbc8999428bd73054f1fc71d31315d01b829be04c (diff)
parentd97920396531300644ba27c342644fc08dbf4672 (diff)
downloadmeta-updater-a8a112afae60ceec1a2108b8717e9a7bf8080e87.tar.gz
Merge pull request #395 from advancedtelematic/feat/import-installed-versions-sumo
Feat/import installed versions sumo
Diffstat (limited to 'classes')
-rw-r--r--classes/image_types_ota.bbclass6
1 files changed, 4 insertions, 2 deletions
diff --git a/classes/image_types_ota.bbclass b/classes/image_types_ota.bbclass
index 360b746..4a51f24 100644
--- a/classes/image_types_ota.bbclass
+++ b/classes/image_types_ota.bbclass
@@ -99,7 +99,7 @@ IMAGE_CMD_otaimg () {
99 99
100 cp -a ${IMAGE_ROOTFS}/var/sota ${PHYS_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/ || true 100 cp -a ${IMAGE_ROOTFS}/var/sota ${PHYS_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/ || true
101 # Create /var/sota if it doesn't exist yet 101 # Create /var/sota if it doesn't exist yet
102 mkdir -p ${PHYS_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/sota || true 102 mkdir -p ${PHYS_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/sota
103 # Ensure the permissions are correctly set 103 # Ensure the permissions are correctly set
104 chmod 700 ${PHYS_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/sota 104 chmod 700 ${PHYS_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/sota
105 105
@@ -112,7 +112,9 @@ IMAGE_CMD_otaimg () {
112 if [ -n "${GARAGE_TARGET_VERSION}" ]; then 112 if [ -n "${GARAGE_TARGET_VERSION}" ]; then
113 target_version=${GARAGE_TARGET_VERSION} 113 target_version=${GARAGE_TARGET_VERSION}
114 fi 114 fi
115 echo "{\"${ostree_target_hash}\":\"${GARAGE_TARGET_NAME}-${target_version}\"}" > ${PHYS_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/sota/installed_versions 115 mkdir -p ${PHYS_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/sota/import
116 echo "{\"${ostree_target_hash}\":\"${GARAGE_TARGET_NAME}-${target_version}\"}" > ${PHYS_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/sota/import/installed_versions
117
116 rm -rf ${HOME_TMP} 118 rm -rf ${HOME_TMP}
117 119
118 # Calculate image type 120 # Calculate image type