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.mo...@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