diff options
author | Anton Gerasimov <anton@advancedtelematic.com> | 2017-12-07 10:43:08 +0100 |
---|---|---|
committer | Anton Gerasimov <anton@advancedtelematic.com> | 2017-12-07 10:46:12 +0100 |
commit | 9ba47ed5058d525c575905caa937c1eca190f7b2 (patch) | |
tree | d8cd8b84fbbf8b662dba274ad1b2581488de7889 | |
parent | 9dcadfe093edbc7a24e180080f672d3cfceceba6 (diff) | |
download | meta-updater-9ba47ed5058d525c575905caa937c1eca190f7b2.tar.gz |
Deploy OSTree image without a branch name
-rw-r--r-- | classes/image_types_ota.bbclass | 6 | ||||
-rw-r--r-- | recipes-sota/aktualizr/aktualizr_git.bb | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/classes/image_types_ota.bbclass b/classes/image_types_ota.bbclass index 09c30ff..5dc4811 100644 --- a/classes/image_types_ota.bbclass +++ b/classes/image_types_ota.bbclass | |||
@@ -85,14 +85,16 @@ IMAGE_CMD_otaimg () { | |||
85 | bberror "Invalid bootloader: ${OSTREE_BOOTLOADER}" | 85 | bberror "Invalid bootloader: ${OSTREE_BOOTLOADER}" |
86 | fi; | 86 | fi; |
87 | 87 | ||
88 | ostree --repo=${PHYS_SYSROOT}/ostree/repo pull-local --remote=${OSTREE_OSNAME} ${OSTREE_REPO} ${OSTREE_BRANCHNAME} | 88 | ostree_target_hash=$(cat ${OSTREE_REPO}/refs/heads/${OSTREE_BRANCHNAME}) |
89 | |||
90 | ostree --repo=${PHYS_SYSROOT}/ostree/repo pull-local --remote=${OSTREE_OSNAME} ${OSTREE_REPO} ${ostree_target_hash} | ||
89 | export OSTREE_BOOT_PARTITION="/boot" | 91 | export OSTREE_BOOT_PARTITION="/boot" |
90 | kargs_list="" | 92 | kargs_list="" |
91 | for arg in ${OSTREE_KERNEL_ARGS}; do | 93 | for arg in ${OSTREE_KERNEL_ARGS}; do |
92 | kargs_list="${kargs_list} --karg-append=$arg" | 94 | kargs_list="${kargs_list} --karg-append=$arg" |
93 | done | 95 | done |
94 | 96 | ||
95 | ostree admin --sysroot=${PHYS_SYSROOT} deploy ${kargs_list} --os=${OSTREE_OSNAME} ${OSTREE_BRANCHNAME} | 97 | ostree admin --sysroot=${PHYS_SYSROOT} deploy ${kargs_list} --os=${OSTREE_OSNAME} ${ostree_target_hash} |
96 | 98 | ||
97 | # Copy deployment /home and /var/sota to sysroot | 99 | # Copy deployment /home and /var/sota to sysroot |
98 | HOME_TMP=`mktemp -d ${WORKDIR}/home-tmp-XXXXX` | 100 | HOME_TMP=`mktemp -d ${WORKDIR}/home-tmp-XXXXX` |
diff --git a/recipes-sota/aktualizr/aktualizr_git.bb b/recipes-sota/aktualizr/aktualizr_git.bb index e713571..44af1f6 100644 --- a/recipes-sota/aktualizr/aktualizr_git.bb +++ b/recipes-sota/aktualizr/aktualizr_git.bb | |||
@@ -18,7 +18,7 @@ PR = "7" | |||
18 | SRC_URI = " \ | 18 | SRC_URI = " \ |
19 | git://github.com/advancedtelematic/aktualizr;branch=${BRANCH} \ | 19 | git://github.com/advancedtelematic/aktualizr;branch=${BRANCH} \ |
20 | " | 20 | " |
21 | SRCREV = "1fb258b13547e229043113380e4a69d404756524" | 21 | SRCREV = "57e9cdb8aa1e8ee9e682628bd67031d9be7aaafa" |
22 | BRANCH ?= "master" | 22 | BRANCH ?= "master" |
23 | 23 | ||
24 | S = "${WORKDIR}/git" | 24 | S = "${WORKDIR}/git" |