* [PATCH 1/1] compat: handle user errors gracefully to avoid parser splat
@ 2026-02-27 10:10 'Felix Moessbauer' via isar-users
2026-03-02 8:41 ` Zhihang Wei
0 siblings, 1 reply; 2+ messages in thread
From: 'Felix Moessbauer' via isar-users @ 2026-02-27 10:10 UTC (permalink / raw)
To: isar-users; +Cc: Felix Moessbauer
A common user error is to forget to define a machine (or use one that is
not defined). In this case, a huge parsing error is printed, giving no
indication what the actually user error is. Instead of crashing the
parser, we now report a meaningful user error.
Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
---
Dear maintainers,
I recommend to include this patch in the upcoming release.
Best regards,
Felix
meta/classes-recipe/compat.bbclass | 3 +++
1 file changed, 3 insertions(+)
diff --git a/meta/classes-recipe/compat.bbclass b/meta/classes-recipe/compat.bbclass
index 907c3ce2..7df55576 100644
--- a/meta/classes-recipe/compat.bbclass
+++ b/meta/classes-recipe/compat.bbclass
@@ -19,6 +19,9 @@ python() {
package_arch = d.getVar('PACKAGE_ARCH')
overrides = d.getVar('OVERRIDES').split(':')
+ if not distro_arch:
+ bb.fatal("DISTRO_ARCH is not set")
+
localdata = bb.data.createCopy(d)
new_overrides = [distro_arch] + [o for o in overrides if not o == package_arch]
localdata.setVar('OVERRIDES', ':'.join(new_overrides))
--
2.51.0
--
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/20260227101009.2465660-1-felix.moessbauer%40siemens.com.
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH 1/1] compat: handle user errors gracefully to avoid parser splat
2026-02-27 10:10 [PATCH 1/1] compat: handle user errors gracefully to avoid parser splat 'Felix Moessbauer' via isar-users
@ 2026-03-02 8:41 ` Zhihang Wei
0 siblings, 0 replies; 2+ messages in thread
From: Zhihang Wei @ 2026-03-02 8:41 UTC (permalink / raw)
To: Felix Moessbauer, isar-users
Applied to next, thanks.
Zhihang
On 2/27/26 11:10, 'Felix Moessbauer' via isar-users wrote:
> A common user error is to forget to define a machine (or use one that is
> not defined). In this case, a huge parsing error is printed, giving no
> indication what the actually user error is. Instead of crashing the
> parser, we now report a meaningful user error.
>
> Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
> ---
> Dear maintainers,
>
> I recommend to include this patch in the upcoming release.
>
> Best regards,
> Felix
>
> meta/classes-recipe/compat.bbclass | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/meta/classes-recipe/compat.bbclass b/meta/classes-recipe/compat.bbclass
> index 907c3ce2..7df55576 100644
> --- a/meta/classes-recipe/compat.bbclass
> +++ b/meta/classes-recipe/compat.bbclass
> @@ -19,6 +19,9 @@ python() {
> package_arch = d.getVar('PACKAGE_ARCH')
> overrides = d.getVar('OVERRIDES').split(':')
>
> + if not distro_arch:
> + bb.fatal("DISTRO_ARCH is not set")
> +
> localdata = bb.data.createCopy(d)
> new_overrides = [distro_arch] + [o for o in overrides if not o == package_arch]
> localdata.setVar('OVERRIDES', ':'.join(new_overrides))
--
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/9d8f796e-dd33-42e5-8d29-5469050db6fb%40ilbers.de.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-03-02 8:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-02-27 10:10 [PATCH 1/1] compat: handle user errors gracefully to avoid parser splat 'Felix Moessbauer' via isar-users
2026-03-02 8:41 ` Zhihang Wei
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox