diff mbox series

[isar-cip-core,1/1] add missing dependency to template subst in swu

Message ID 20230412064118.431415-1-felix.moessbauer@siemens.com (mailing list archive)
State Accepted
Headers show
Series [isar-cip-core,1/1] add missing dependency to template subst in swu | expand

Commit Message

MOESSBAUER, Felix April 12, 2023, 6:41 a.m. UTC
Before creating swu files, the sw-description temlate needs to be
expanded. This logic is also independent of the imagetype.
Previously, only some image types had this task in the dependency chain
before invoking the swu creation. By that, it was working for e.g. wic,
but not for ext4 rootfs images (referring to the type of the abrootfs).

Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
---
 classes/swupdate.bbclass | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Jan Kiszka April 13, 2023, 7:16 p.m. UTC | #1
On 12.04.23 08:41, Felix Moessbauer wrote:
> Before creating swu files, the sw-description temlate needs to be

template - fixed up during merge

> expanded. This logic is also independent of the imagetype.
> Previously, only some image types had this task in the dependency chain
> before invoking the swu creation. By that, it was working for e.g. wic,
> but not for ext4 rootfs images (referring to the type of the abrootfs).
> 
> Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
> ---
>  classes/swupdate.bbclass | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/classes/swupdate.bbclass b/classes/swupdate.bbclass
> index 064d0ad..e12a4d2 100644
> --- a/classes/swupdate.bbclass
> +++ b/classes/swupdate.bbclass
> @@ -9,6 +9,9 @@
>  #  Felix Moessbauer <felix.moessbauer@siemens.com>
>  #
>  # SPDX-License-Identifier: MIT
> +
> +inherit template
> +
>  SWU_ROOTFS_TYPE ?= "squashfs"
>  SWU_ROOTFS_NAME ?= "${IMAGE_FULLNAME}"
>  # compression type as defined by swupdate (zlib or zstd)
> @@ -50,6 +53,7 @@ def get_swu_compression_type(d):
>  # We append to the path, so locally provided config files are preferred
>  FILESEXTRAPATHS:append = ":${LAYERDIR_cip-core}/recipes-core/images/swu"
>  
> +do_image_swu[depends] += "${PN}:do_transform_template"
>  do_image_swu[stamp-extra-info] = "${DISTRO}-${MACHINE}"
>  do_image_swu[cleandirs] += "${WORKDIR}/swu"
>  IMAGE_CMD:swu() {

Thanks, applied.

Jan
diff mbox series

Patch

diff --git a/classes/swupdate.bbclass b/classes/swupdate.bbclass
index 064d0ad..e12a4d2 100644
--- a/classes/swupdate.bbclass
+++ b/classes/swupdate.bbclass
@@ -9,6 +9,9 @@ 
 #  Felix Moessbauer <felix.moessbauer@siemens.com>
 #
 # SPDX-License-Identifier: MIT
+
+inherit template
+
 SWU_ROOTFS_TYPE ?= "squashfs"
 SWU_ROOTFS_NAME ?= "${IMAGE_FULLNAME}"
 # compression type as defined by swupdate (zlib or zstd)
@@ -50,6 +53,7 @@  def get_swu_compression_type(d):
 # We append to the path, so locally provided config files are preferred
 FILESEXTRAPATHS:append = ":${LAYERDIR_cip-core}/recipes-core/images/swu"
 
+do_image_swu[depends] += "${PN}:do_transform_template"
 do_image_swu[stamp-extra-info] = "${DISTRO}-${MACHINE}"
 do_image_swu[cleandirs] += "${WORKDIR}/swu"
 IMAGE_CMD:swu() {