diff options
author | lbonn <lbonn@users.noreply.github.com> | 2018-09-18 10:31:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-18 10:31:28 +0200 |
commit | ae02ae957a6e094b822d747b3a001a3a8c8845ed (patch) | |
tree | e063663e4e508a604025b16d6796391e000a8040 | |
parent | d19a74303fb573526bc604c7da94daed11883494 (diff) | |
parent | b62aa4caee97bc12749a83cb271d2b46d203cdaa (diff) | |
download | meta-updater-ae02ae957a6e094b822d747b3a001a3a8c8845ed.tar.gz |
Merge pull request #390 from advancedtelematic/fix/new-installed-versions-import
Update `installed_versions` passing to new location
-rw-r--r-- | classes/image_types_ota.bbclass | 5 | ||||
-rw-r--r-- | lib/oeqa/selftest/cases/updater.py | 4 | ||||
-rwxr-xr-x | recipes-sota/aktualizr/aktualizr_git.bb | 2 |
3 files changed, 6 insertions, 5 deletions
diff --git a/classes/image_types_ota.bbclass b/classes/image_types_ota.bbclass index cd58080..4380494 100644 --- a/classes/image_types_ota.bbclass +++ b/classes/image_types_ota.bbclass | |||
@@ -103,7 +103,7 @@ fakeroot do_otasetup () { | |||
103 | 103 | ||
104 | cp -a ${IMAGE_ROOTFS}/var/sota ${OTA_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/ || true | 104 | cp -a ${IMAGE_ROOTFS}/var/sota ${OTA_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/ || true |
105 | # Create /var/sota if it doesn't exist yet | 105 | # Create /var/sota if it doesn't exist yet |
106 | mkdir -p ${OTA_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/sota || true | 106 | mkdir -p ${OTA_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/sota |
107 | # Ensure the permissions are correctly set | 107 | # Ensure the permissions are correctly set |
108 | chmod 700 ${OTA_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/sota | 108 | chmod 700 ${OTA_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/sota |
109 | 109 | ||
@@ -116,7 +116,8 @@ fakeroot do_otasetup () { | |||
116 | if [ -n "${GARAGE_TARGET_VERSION}" ]; then | 116 | if [ -n "${GARAGE_TARGET_VERSION}" ]; then |
117 | target_version=${GARAGE_TARGET_VERSION} | 117 | target_version=${GARAGE_TARGET_VERSION} |
118 | fi | 118 | fi |
119 | echo "{\"${ostree_target_hash}\":\"${GARAGE_TARGET_NAME}-${target_version}\"}" > ${OTA_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/sota/installed_versions | 119 | mkdir -p ${OTA_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/sota/import |
120 | echo "{\"${ostree_target_hash}\":\"${GARAGE_TARGET_NAME}-${target_version}\"}" > ${OTA_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/sota/import/installed_versions | ||
120 | echo "All done. Cleaning up dir: ${HOME_TMP}" | 121 | echo "All done. Cleaning up dir: ${HOME_TMP}" |
121 | rm -rf ${HOME_TMP} | 122 | rm -rf ${HOME_TMP} |
122 | } | 123 | } |
diff --git a/lib/oeqa/selftest/cases/updater.py b/lib/oeqa/selftest/cases/updater.py index 1c5a1dc..a3fe407 100644 --- a/lib/oeqa/selftest/cases/updater.py +++ b/lib/oeqa/selftest/cases/updater.py | |||
@@ -226,8 +226,8 @@ class ManualControlTests(OESelftestTestCase): | |||
226 | Disable the systemd service then run aktualizr manually | 226 | Disable the systemd service then run aktualizr manually |
227 | """ | 227 | """ |
228 | sleep(20) | 228 | sleep(20) |
229 | stdout, stderr, retcode = self.qemu_command('aktualizr-info --allow-migrate') | 229 | stdout, stderr, retcode = self.qemu_command('aktualizr-info') |
230 | self.assertIn(b'Fetched metadata: no', stdout, | 230 | self.assertIn(b'Can\'t open database', stdout, |
231 | 'Aktualizr should not have run yet' + stderr.decode() + stdout.decode()) | 231 | 'Aktualizr should not have run yet' + stderr.decode() + stdout.decode()) |
232 | 232 | ||
233 | stdout, stderr, retcode = self.qemu_command('aktualizr --running-mode=once') | 233 | stdout, stderr, retcode = self.qemu_command('aktualizr --running-mode=once') |
diff --git a/recipes-sota/aktualizr/aktualizr_git.bb b/recipes-sota/aktualizr/aktualizr_git.bb index 332235b..9112546 100755 --- a/recipes-sota/aktualizr/aktualizr_git.bb +++ b/recipes-sota/aktualizr/aktualizr_git.bb | |||
@@ -26,7 +26,7 @@ SRC_URI = " \ | |||
26 | file://aktualizr-secondary.socket \ | 26 | file://aktualizr-secondary.socket \ |
27 | file://aktualizr-serialcan.service \ | 27 | file://aktualizr-serialcan.service \ |
28 | " | 28 | " |
29 | SRCREV = "7fc5730719a33c62df394a1fec8488ff5513c90c" | 29 | SRCREV = "090c463c6f1ec7a7ceae963cd7b4ba99aa74e1f5" |
30 | BRANCH ?= "master" | 30 | BRANCH ?= "master" |
31 | 31 | ||
32 | S = "${WORKDIR}/git" | 32 | S = "${WORKDIR}/git" |