From: Uladzimir Bely <ubely@ilbers.de>
To: isar-users <isar-users@googlegroups.com>
Subject: Re: [PATCH] sdk: Avoid parsing errors when DISTRO_ARCH is not yet set
Date: Tue, 28 Feb 2023 08:50:15 +0300 [thread overview]
Message-ID: <9489441.eNJFYEL58v@hp> (raw)
In-Reply-To: <4ac8a0a6-50ac-5a76-88c0-3eef5d2f96a9@siemens.com>
In mail from Wednesday, 22 February 2023 19:28:42 +03 user Jan Kiszka wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
>
> In multiconfig setups, it can happen during some parsing steps that a
> machine and, thus, a concrete DISTRO_ARCH is not yet set, leading to
>
> The stack trace of python calls that resulted in this exception/failure was:
> File: '<code>', lineno: 4, function: <module>
> 0001:__anon_158__build____work_isar_meta_classes_base_bbclass(d)
> 0002:__anon_162__build____work_isar_meta_classes_sstate_bbclass(d)
> 0003:__anon_56__build____work_isar_meta_classes_image_bbclass(d)
> *** 0004:__anon_56__build____work_isar_meta_classes_sdk_bbclass(d)
> 0005:__anon_21__build____work_isar_meta_classes_buildchroot_bbclass(d)
>
> 0006:__anon_84__build____work_isar_meta_classes_imagetypes_wic_bbclass(d)
> 0007:__anon_24__build____work_isar_meta_classes_imagetypes_container_bbclas
> s(d) 0008:__anon_305__build____work_isar_meta_classes_image_bbclass(d) File:
> '/build/../work/isar/meta/classes/sdk.bbclass', lineno: 52, function:
> __anon_56__build____work_isar_meta_classes_sdk_bbclass 0048: distro_arch
> = d.getVar('DISTRO_ARCH')
> 0049: if mode == "0" or d.getVar('HOST_ARCH') == distro_arch:
> 0050: toolchain = "build-essential"
> 0051: else:
> *** 0052: toolchain = "crossbuild-essential-" + distro_arch
> 0053: if d.getVar('ISAR_ENABLE_COMPAT_ARCH', True) == "1":
> 0054: toolchain += " crossbuild-essential-" +
> d.getVar('COMPAT_DISTRO_ARCH') 0055: d.setVar('TOOLCHAIN', toolchain)
> 0056:}
> Exception: TypeError: can only concatenate str (not "NoneType") to str
>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
>
> Found in mtda: https://github.com/siemens/mtda/pull/283
>
> meta/classes/sdk.bbclass | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/classes/sdk.bbclass b/meta/classes/sdk.bbclass
> index 0a98ea04..01eb3a67 100644
> --- a/meta/classes/sdk.bbclass
> +++ b/meta/classes/sdk.bbclass
> @@ -46,7 +46,7 @@ SDK_PREINSTALL += " \
> python __anonymous() {
> mode = d.getVar('ISAR_CROSS_COMPILE', True)
> distro_arch = d.getVar('DISTRO_ARCH')
> - if mode == "0" or d.getVar('HOST_ARCH') == distro_arch:
> + if mode == "0" or d.getVar('HOST_ARCH') == distro_arch or distro_arch
> == None: toolchain = "build-essential"
> else:
> toolchain = "crossbuild-essential-" + distro_arch
Applied to next, thanks
prev parent reply other threads:[~2023-02-28 5:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-22 16:28 Jan Kiszka
2023-02-27 10:41 ` Jan Kiszka
2023-02-27 11:53 ` Uladzimir Bely
2023-02-27 12:13 ` Jan Kiszka
2023-02-28 5:50 ` Uladzimir Bely [this message]
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=9489441.eNJFYEL58v@hp \
--to=ubely@ilbers.de \
--cc=isar-users@googlegroups.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