From: Jan Kiszka <jan.kiszka@siemens.com>
To: isar-users <isar-users@googlegroups.com>
Cc: "Moessbauer, Felix (T CED SES-DE)" <felix.moessbauer@siemens.com>,
"Hombourger,
Cedric (DI SW MG EPT)" <cedric.hombourger@siemens.com>
Subject: [PATCH] sdk: Avoid parsing errors when DISTRO_ARCH is not yet set
Date: Wed, 22 Feb 2023 17:28:42 +0100 [thread overview]
Message-ID: <4ac8a0a6-50ac-5a76-88c0-3eef5d2f96a9@siemens.com> (raw)
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_bbclass(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
--
2.35.3
next reply other threads:[~2023-02-22 16:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-22 16:28 Jan Kiszka [this message]
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
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=4ac8a0a6-50ac-5a76-88c0-3eef5d2f96a9@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=cedric.hombourger@siemens.com \
--cc=felix.moessbauer@siemens.com \
--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