public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH] buildchroot: Add buildchroot dependency for imager
@ 2021-07-07 16:41 Anton Mikanovich
  2021-07-08 11:37 ` Jan Kiszka
  0 siblings, 1 reply; 5+ messages in thread
From: Anton Mikanovich @ 2021-07-07 16:41 UTC (permalink / raw)
  To: isar-users; +Cc: Anton Mikanovich

Task do_install_imager_deps is using BUILDCHROOT but not depends on it.

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

diff --git a/meta/classes/buildchroot.bbclass b/meta/classes/buildchroot.bbclass
index 806a29f..1f90768 100644
--- a/meta/classes/buildchroot.bbclass
+++ b/meta/classes/buildchroot.bbclass
@@ -18,6 +18,7 @@ python __anonymous() {
         rootfs = d.getVar('BUILDCHROOT_HOST_DIR', True)
 
     d.setVarFlag('do_apt_fetch', 'depends', dep)
+    d.setVarFlag('do_install_imager_deps', 'depends', dep)
     d.setVar('BUILDCHROOT_DIR', rootfs)
 }
 
-- 
2.20.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] buildchroot: Add buildchroot dependency for imager
  2021-07-07 16:41 [PATCH] buildchroot: Add buildchroot dependency for imager Anton Mikanovich
@ 2021-07-08 11:37 ` Jan Kiszka
  2021-07-08 11:44   ` Anton Mikanovich
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Kiszka @ 2021-07-08 11:37 UTC (permalink / raw)
  To: Anton Mikanovich, isar-users

On 07.07.21 18:41, Anton Mikanovich wrote:
> Task do_install_imager_deps is using BUILDCHROOT but not depends on it.
> 
> Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
> ---
>  meta/classes/buildchroot.bbclass | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/meta/classes/buildchroot.bbclass b/meta/classes/buildchroot.bbclass
> index 806a29f..1f90768 100644
> --- a/meta/classes/buildchroot.bbclass
> +++ b/meta/classes/buildchroot.bbclass
> @@ -18,6 +18,7 @@ python __anonymous() {
>          rootfs = d.getVar('BUILDCHROOT_HOST_DIR', True)
>  
>      d.setVarFlag('do_apt_fetch', 'depends', dep)
> +    d.setVarFlag('do_install_imager_deps', 'depends', dep)
>      d.setVar('BUILDCHROOT_DIR', rootfs)
>  }
>  
> 

But there is

do_install_imager_deps[depends] = "buildchroot-target:do_build"

in meta/classes/image-tools-extension.bbclass. Why is the above
additionally needed?

Jan

-- 
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] buildchroot: Add buildchroot dependency for imager
  2021-07-08 11:37 ` Jan Kiszka
@ 2021-07-08 11:44   ` Anton Mikanovich
  2021-07-08 12:11     ` Jan Kiszka
  0 siblings, 1 reply; 5+ messages in thread
From: Anton Mikanovich @ 2021-07-08 11:44 UTC (permalink / raw)
  To: Jan Kiszka, isar-users

08.07.2021 14:37, Jan Kiszka wrote:
> But there is
>
> do_install_imager_deps[depends] = "buildchroot-target:do_build"
>
> in meta/classes/image-tools-extension.bbclass. Why is the above
> additionally needed?
>
> Jan
>
Because buildchroot is not always buildchroot-target, but depends on 
ISAR_CROSS_COMPILE value.
This change is mostly done for situations like in `[PATCH] ubifs-img: 
Force cross-compile usage`.
Hardcoded dependency should be removed, I will prepare v2 and change 
commit log.

-- 
Anton Mikanovich
Promwad Ltd.
External service provider of ilbers GmbH
Maria-Merian-Str. 8
85521 Ottobrunn, Germany
+49 (89) 122 67 24-0
Commercial register Munich, HRB 214197
General Manager: Baurzhan Ismagulov


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] buildchroot: Add buildchroot dependency for imager
  2021-07-08 11:44   ` Anton Mikanovich
@ 2021-07-08 12:11     ` Jan Kiszka
  2021-07-08 12:25       ` Anton Mikanovich
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Kiszka @ 2021-07-08 12:11 UTC (permalink / raw)
  To: Anton Mikanovich, isar-users

On 08.07.21 13:44, Anton Mikanovich wrote:
> 08.07.2021 14:37, Jan Kiszka wrote:
>> But there is
>>
>> do_install_imager_deps[depends] = "buildchroot-target:do_build"
>>
>> in meta/classes/image-tools-extension.bbclass. Why is the above
>> additionally needed?
>>
>> Jan
>>
> Because buildchroot is not always buildchroot-target, but depends on
> ISAR_CROSS_COMPILE value.

It was always buildchroot-target for imaging, so far

> This change is mostly done for situations like in `[PATCH] ubifs-img:
> Force cross-compile usage`.

And that creates a new situation, indeed.

> Hardcoded dependency should be removed, I will prepare v2 and change
> commit log.

Right, that would be good. However, the original dependency was omre
cleanly located than this hack. Why should builchroot know who all
depends on it?

Jan

-- 
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] buildchroot: Add buildchroot dependency for imager
  2021-07-08 12:11     ` Jan Kiszka
@ 2021-07-08 12:25       ` Anton Mikanovich
  0 siblings, 0 replies; 5+ messages in thread
From: Anton Mikanovich @ 2021-07-08 12:25 UTC (permalink / raw)
  To: Jan Kiszka, isar-users

08.07.2021 15:11, Jan Kiszka wrote:
> Right, that would be good. However, the original dependency was omre
> cleanly located than this hack. Why should builchroot know who all
> depends on it?
>
> Jan
>
I also agree that anonymous function is not the right place to control 
which buildchroot to use, because it is executed after all other 
datastore values are parsed. But this is the place currently, quite a 
big rebuild should be done instead.

-- 
Anton Mikanovich
Promwad Ltd.
External service provider of ilbers GmbH
Maria-Merian-Str. 8
85521 Ottobrunn, Germany
+49 (89) 122 67 24-0
Commercial register Munich, HRB 214197
General Manager: Baurzhan Ismagulov


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-07-08 12:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-07 16:41 [PATCH] buildchroot: Add buildchroot dependency for imager Anton Mikanovich
2021-07-08 11:37 ` Jan Kiszka
2021-07-08 11:44   ` Anton Mikanovich
2021-07-08 12:11     ` Jan Kiszka
2021-07-08 12:25       ` Anton Mikanovich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox