diff mbox series

[meta-swupdate,dunfell+,v2,3/6] swupdate-image: use image link name

Message ID 20210907132240.2987302-4-adrian.freihofer@siemens.com
State Changes Requested
Headers show
Series swupdate-common: get do_swuimage vardeps | expand

Commit Message

Adrian Freihofer Sept. 7, 2021, 1:22 p.m. UTC
The IMAGE_LINK_NAME proved to be more reliable than the IMAGE_NAME. It
refers the correct artifact also if an image with an older time-stamp
should be included or if a layer chagnes the IMAGE_NAME or the
IMAGE_LINK_NAME variable.
---
 classes/swupdate-image.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Stefano Babic Sept. 7, 2021, 2:38 p.m. UTC | #1
Hi Adrian,

On 07.09.21 15:22, Adrian Freihofer wrote:
> The IMAGE_LINK_NAME proved to be more reliable than the IMAGE_NAME. It
> refers the correct artifact also if an image with an older time-stamp
> should be included or if a layer chagnes the IMAGE_NAME or the
> IMAGE_LINK_NAME variable.
> ---
>   classes/swupdate-image.bbclass | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/classes/swupdate-image.bbclass b/classes/swupdate-image.bbclass
> index 6df444a..ae4beeb 100644
> --- a/classes/swupdate-image.bbclass
> +++ b/classes/swupdate-image.bbclass
> @@ -13,7 +13,7 @@ inherit swupdate-common.bbclass
>   S = "${WORKDIR}/${PN}"
>   
>   SRC_URI += "file://sw-description"
> -SWUPDATE_IMAGES += "${IMAGE_BASENAME}"
> +SWUPDATE_IMAGES += "${IMAGE_LINK_NAME}"

This is not clear to me. IMAGE_LINK_NAME is really 
${IMAGE_BASENAME}-${MACHINE}, and in the common class the search is 
ruled by SWUPDATE_IMAGES_NOAPPEND_MACHINE. If the name already contains 
both, it cannot be split again. Why is this better ?


>   do_unpack[noexec] = "0"
>   
>   addtask swuimage after do_image_complete before do_build
> 

Regards,
Stefano
diff mbox series

Patch

diff --git a/classes/swupdate-image.bbclass b/classes/swupdate-image.bbclass
index 6df444a..ae4beeb 100644
--- a/classes/swupdate-image.bbclass
+++ b/classes/swupdate-image.bbclass
@@ -13,7 +13,7 @@  inherit swupdate-common.bbclass
 S = "${WORKDIR}/${PN}"
 
 SRC_URI += "file://sw-description"
-SWUPDATE_IMAGES += "${IMAGE_BASENAME}"
+SWUPDATE_IMAGES += "${IMAGE_LINK_NAME}"
 do_unpack[noexec] = "0"
 
 addtask swuimage after do_image_complete before do_build