From d2a57a9bfc8b3939addf92d14d9178f6f9ebb434 Mon Sep 17 00:00:00 2001 From: Laurent Bonnans Date: Thu, 15 Aug 2019 12:23:57 +0200 Subject: Do not export anything in sota.bbclass A simple variable definition will be enough and doing an export there completely kills caching. Cherry-picked from master with additional fix to use yocto variables instead of bash ones (not present anymore). Signed-off-by: Laurent Bonnans --- classes/image_types_ostree.bbclass | 4 ++-- classes/image_types_ota.bbclass | 6 +++--- classes/sota.bbclass | 10 +++++----- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/classes/image_types_ostree.bbclass b/classes/image_types_ostree.bbclass index 3300a3d..edddf37 100644 --- a/classes/image_types_ostree.bbclass +++ b/classes/image_types_ostree.bbclass @@ -16,11 +16,11 @@ OSTREE_UPDATE_SUMMARY ??= "0" SYSTEMD_USED = "${@oe.utils.ifelse(d.getVar('VIRTUAL-RUNTIME_init_manager', True) == 'systemd', 'true', '')}" IMAGE_CMD_ostree () { - if [ -z "$OSTREE_REPO" ]; then + if [ -z "${OSTREE_REPO}" ]; then bbfatal "OSTREE_REPO should be set in your local.conf" fi - if [ -z "$OSTREE_BRANCHNAME" ]; then + if [ -z "${OSTREE_BRANCHNAME}" ]; then bbfatal "OSTREE_BRANCHNAME should be set in your local.conf" fi diff --git a/classes/image_types_ota.bbclass b/classes/image_types_ota.bbclass index b14d2bb..6d0676b 100644 --- a/classes/image_types_ota.bbclass +++ b/classes/image_types_ota.bbclass @@ -48,15 +48,15 @@ IMAGE_CMD_otaimg () { if ${@bb.utils.contains('IMAGE_FSTYPES', 'otaimg', 'false', 'true', d)}; then return fi - if [ -z "$OSTREE_REPO" ]; then + if [ -z "${OSTREE_REPO}" ]; then bbfatal "OSTREE_REPO should be set in your local.conf" fi - if [ -z "$OSTREE_OSNAME" ]; then + if [ -z "${OSTREE_OSNAME}" ]; then bbfatal "OSTREE_OSNAME should be set in your local.conf" fi - if [ -z "$OSTREE_BRANCHNAME" ]; then + if [ -z "${OSTREE_BRANCHNAME}" ]; then bbfatal "OSTREE_BRANCHNAME should be set in your local.conf" fi diff --git a/classes/sota.bbclass b/classes/sota.bbclass index 61d27ad..85401d5 100644 --- a/classes/sota.bbclass +++ b/classes/sota.bbclass @@ -40,11 +40,11 @@ EXTRA_IMAGEDEPENDS_append_sota = " parted-native mtools-native dosfstools-native OSTREE_INITRAMFS_FSTYPES ??= "${@oe.utils.ifelse(d.getVar('OSTREE_BOOTLOADER', True) == 'u-boot', 'ext4.gz.u-boot', 'ext4.gz')}" # Please redefine OSTREE_REPO in order to have a persistent OSTree repo -export OSTREE_REPO ?= "${DEPLOY_DIR_IMAGE}/ostree_repo" -export OSTREE_BRANCHNAME ?= "${SOTA_HARDWARE_ID}" -export OSTREE_OSNAME ?= "poky" -export OSTREE_BOOTLOADER ??= 'u-boot' -export OSTREE_BOOT_PARTITION ??= "/boot" +OSTREE_REPO ?= "${DEPLOY_DIR_IMAGE}/ostree_repo" +OSTREE_BRANCHNAME ?= "${SOTA_HARDWARE_ID}" +OSTREE_OSNAME ?= "poky" +OSTREE_BOOTLOADER ??= 'u-boot' +OSTREE_BOOT_PARTITION ??= "/boot" OSTREE_INITRAMFS_IMAGE ?= "initramfs-ostree-image" -- cgit v1.2.3-54-g00ecf