diff mbox series

[meta-swupdate,2/4] swupdate_class: fix do_swuimage circular dependency

Message ID 20210211103807.9022-3-agust@denx.de
State Changes Requested
Headers show
Series Extend swupdate class to support swu image fstype | expand

Commit Message

Anatolij Gustschin Feb. 11, 2021, 10:38 a.m. UTC
When building with 'swu' image fstype enabled, there is an error:
 ...
 core-image-full-cmdline.bb:do_build has circular dependency on \
 core-image-full-cmdline.bb:do_swuimage

Depend on do_image_complete instead of do_build (do_build is an
empty task here).

Signed-off-by: Anatolij Gustschin <agust@denx.de>
---
 classes/swupdate.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Stefano Babic Feb. 11, 2021, 12:33 p.m. UTC | #1
On 11.02.21 11:38, Anatolij Gustschin wrote:
> When building with 'swu' image fstype enabled, there is an error:
>  ...
>  core-image-full-cmdline.bb:do_build has circular dependency on \
>  core-image-full-cmdline.bb:do_swuimage
> 
> Depend on do_image_complete instead of do_build (do_build is an
> empty task here).
> 
> Signed-off-by: Anatolij Gustschin <agust@denx.de>
> ---
>  classes/swupdate.bbclass | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/classes/swupdate.bbclass b/classes/swupdate.bbclass
> index 774de01..70b855f 100644
> --- a/classes/swupdate.bbclass
> +++ b/classes/swupdate.bbclass
> @@ -51,7 +51,7 @@ def swupdate_getdepends(d):
>  
>      depstr = ""
>      for dep in deps:
> -        depstr += " " + dep + ":do_build"
> +        depstr += " " + dep + ":do_image_complete"

But I do not always have do_image_complete. For example, if I add
"virtual/kernel", this should fail - does it work in any condition ?

>      return depstr
>  
>  IMGDEPLOYDIR = "${WORKDIR}/deploy-${PN}-swuimage"
> 

Regards,
Stefano
Anatolij Gustschin Feb. 15, 2021, 9:17 p.m. UTC | #2
Hi Stefano,

On Thu, 11 Feb 2021 13:33:10 +0100
Stefano Babic sbabic@denx.de wrote:

>On 11.02.21 11:38, Anatolij Gustschin wrote:
>> When building with 'swu' image fstype enabled, there is an error:
>>  ...
>>  core-image-full-cmdline.bb:do_build has circular dependency on \
>>  core-image-full-cmdline.bb:do_swuimage
>> 
>> Depend on do_image_complete instead of do_build (do_build is an
>> empty task here).
>> 
>> Signed-off-by: Anatolij Gustschin <agust@denx.de>
>> ---
>>  classes/swupdate.bbclass | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/classes/swupdate.bbclass b/classes/swupdate.bbclass
>> index 774de01..70b855f 100644
>> --- a/classes/swupdate.bbclass
>> +++ b/classes/swupdate.bbclass
>> @@ -51,7 +51,7 @@ def swupdate_getdepends(d):
>>  
>>      depstr = ""
>>      for dep in deps:
>> -        depstr += " " + dep + ":do_build"
>> +        depstr += " " + dep + ":do_image_complete"  
>
>But I do not always have do_image_complete. For example, if I add
>"virtual/kernel", this should fail - does it work in any condition ?

you are right, as is it will fail when IMAGE_DEPENDS contains
non image recipes like "virtual/kernel". I'll change to add it
conditionally.

Thanks,
Anatolij
diff mbox series

Patch

diff --git a/classes/swupdate.bbclass b/classes/swupdate.bbclass
index 774de01..70b855f 100644
--- a/classes/swupdate.bbclass
+++ b/classes/swupdate.bbclass
@@ -51,7 +51,7 @@  def swupdate_getdepends(d):
 
     depstr = ""
     for dep in deps:
-        depstr += " " + dep + ":do_build"
+        depstr += " " + dep + ":do_image_complete"
     return depstr
 
 IMGDEPLOYDIR = "${WORKDIR}/deploy-${PN}-swuimage"