image: Fix basehash calculation

Message ID 20241114134028.1465640-1-amikan@ilbers.de
State Accepted, archived
Headers show
Series image: Fix basehash calculation | expand

Commit Message

Anton Mikanovich Nov. 14, 2024, 1:40 p.m. UTC
Temporary variables like INSTALL_image_wic were created inside
anonymous function, so bitbake was unable to add them into vardeps to
calculate dependencies correctly. Add this variables manually to fix
basehash calculation.

Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
---
 meta/classes/image.bbclass | 1 +
 1 file changed, 1 insertion(+)

Comments

Uladzimir Bely Nov. 21, 2024, 6:48 a.m. UTC | #1
On Thu, 2024-11-14 at 15:40 +0200, Anton Mikanovich wrote:
> Temporary variables like INSTALL_image_wic were created inside
> anonymous function, so bitbake was unable to add them into vardeps to
> calculate dependencies correctly. Add this variables manually to fix
> basehash calculation.
> 
> Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
> ---
>  meta/classes/image.bbclass | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
> index 472df3cf..982523b0 100644
> --- a/meta/classes/image.bbclass
> +++ b/meta/classes/image.bbclass
> @@ -284,6 +284,7 @@ python() {
>          # set per type imager dependencies
>          d.setVar('INSTALL_image_%s' % bt_clean,
> d.getVar('IMAGER_INSTALL'))
>          d.appendVar('INSTALL_image_%s' % bt_clean, ' ' + '
> '.join(sorted(local_imager_install | local_conversion_install)))
> +        d.appendVarFlag(task, 'vardeps', ' INSTALL_image_%s' %
> bt_clean)
>  
>      d.appendVar('IMAGER_INSTALL', ' ' + '
> '.join(sorted(imager_install | conversion_install)))
>      d.appendVar('IMAGER_BUILD_DEPS', ' ' + '
> '.join(sorted(imager_build_deps)))
> -- 
> 2.34.1
> 

Applied to next.

Patch

diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 472df3cf..982523b0 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -284,6 +284,7 @@  python() {
         # set per type imager dependencies
         d.setVar('INSTALL_image_%s' % bt_clean, d.getVar('IMAGER_INSTALL'))
         d.appendVar('INSTALL_image_%s' % bt_clean, ' ' + ' '.join(sorted(local_imager_install | local_conversion_install)))
+        d.appendVarFlag(task, 'vardeps', ' INSTALL_image_%s' % bt_clean)
 
     d.appendVar('IMAGER_INSTALL', ' ' + ' '.join(sorted(imager_install | conversion_install)))
     d.appendVar('IMAGER_BUILD_DEPS', ' ' + ' '.join(sorted(imager_build_deps)))