From: "'Jan Kiszka' via isar-users" <isar-users@googlegroups.com>
To: isar-users <isar-users@googlegroups.com>,
Anton Mikanovich <amikan@ilbers.de>
Cc: Felix Moessbauer <felix.moessbauer@siemens.com>,
Quirin Gylstorff <quirin.gylstorff@siemens.com>,
"Schmidt, Adriaan" <adriaan.schmidt@siemens.com>
Subject: Re: [PATCH] image: Fix construction of do_image_tools dependencies
Date: Thu, 16 Oct 2025 20:55:58 +0200 [thread overview]
Message-ID: <50817b6b-562b-4bc9-b047-2af3ad6f4075@siemens.com> (raw)
In-Reply-To: <0f16240d-aca7-4f03-b0f7-1567c5b4c26f@siemens.com>
On 16.10.25 20:51, 'Jan Kiszka' via isar-users wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
>
> The attempt to translate IMAGER_BUILD_DEPS into do_image_tools[depends]
> via an anonymous python functions failed because of an ordering issue
> between the anonymous functions in image-tools-extension.bbclass and
> image.bbclass. The latter was expanding IMAGER_BUILD_DEPS:<image-type>
> after image-tools-extension translated this variable into
> do_image_tools[depends]. Resolve this by using an inline function for
> the latter step.
>
Fixes: 8cf87a800ec0 ("image-tools-extension: Limit IMAGER_BUILD_DEPS to do_image_tools task")
Sorry, forgotten.
Jan
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
>
> Too bad that none of the isar tests detected it, only isar-cip-core
> after updating its isar revision far enough. Looks like we have no self-
> built packages for IMAGER_BUILD_DEPS here.
>
> meta/classes/image-tools-extension.bbclass | 8 +++-----
> meta/classes/image.bbclass | 2 +-
> 2 files changed, 4 insertions(+), 6 deletions(-)
>
> diff --git a/meta/classes/image-tools-extension.bbclass b/meta/classes/image-tools-extension.bbclass
> index 5e248f2e..3f284b39 100644
> --- a/meta/classes/image-tools-extension.bbclass
> +++ b/meta/classes/image-tools-extension.bbclass
> @@ -1,5 +1,5 @@
> # This software is a part of ISAR.
> -# Copyright (C) Siemens AG, 2019-2024
> +# Copyright (C) Siemens AG, 2019-2025
> #
> # SPDX-License-Identifier: MIT
> #
> @@ -10,10 +10,8 @@ inherit sbuild
> IMAGER_INSTALL ??= ""
> IMAGER_BUILD_DEPS ??= ""
>
> -python() {
> - for dep in d.getVar('IMAGER_BUILD_DEPS').split():
> - d.appendVarFlag('do_image_tools', 'depends', ' ' + dep + ':do_deploy_deb')
> -}
> +do_image_tools[depends] += " \
> + ${@' '.join(dep + ':do_deploy_deb' for dep in d.getVar('IMAGER_BUILD_DEPS').split())}"
>
> SCHROOT_MOUNTS = "${WORKDIR}:${PP_WORK} ${IMAGE_ROOTFS}:${PP_ROOTFS} ${DEPLOY_DIR_IMAGE}:${PP_DEPLOY}"
> SCHROOT_MOUNTS += "${REPO_ISAR_DIR}/${DISTRO}:/isar-apt"
> diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
> index bd1b8552..441ea936 100644
> --- a/meta/classes/image.bbclass
> +++ b/meta/classes/image.bbclass
> @@ -373,7 +373,7 @@ python do_image_tools() {
> addtask image_tools before do_build after do_rootfs
>
> # all imagetypes are depend on schroot and isar-apt
> -do_image_tools[depends] = "${SCHROOT_DEP} isar-apt:do_cache_config"
> +do_image_tools[depends] += "${SCHROOT_DEP} isar-apt:do_cache_config"
> do_image_tools[deptask] = "do_deploy_deb"
>
> python do_image() {
--
Siemens AG, Foundational Technologies
Linux Expert Center
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/50817b6b-562b-4bc9-b047-2af3ad6f4075%40siemens.com.
next prev parent reply other threads:[~2025-10-16 18:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-16 18:51 'Jan Kiszka' via isar-users
2025-10-16 18:55 ` 'Jan Kiszka' via isar-users [this message]
2025-10-17 7:13 ` 'MOESSBAUER, Felix' via isar-users
2025-10-19 12:06 ` 'cedric.hombourger@siemens.com' via isar-users
2025-10-23 7:58 ` Zhihang Wei
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50817b6b-562b-4bc9-b047-2af3ad6f4075@siemens.com \
--to=isar-users@googlegroups.com \
--cc=adriaan.schmidt@siemens.com \
--cc=amikan@ilbers.de \
--cc=felix.moessbauer@siemens.com \
--cc=jan.kiszka@siemens.com \
--cc=quirin.gylstorff@siemens.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox