@@ -348,6 +348,10 @@ python base_eventhandler() {
profprov = d.getVar("PREFERRED_PROVIDER_" + p)
if profprov and pn != profprov:
raise bb.parse.SkipRecipe("PREFERRED_PROVIDER_%s set to %s, not %s" % (p, profprov, pn))
+
+ # Bail out early if parsing raised any QA errors
+ oe.qa.exit_if_errors(d)
+
}
CONFIGURESTAMPFILE = "${WORKDIR}/configure.sstate"
@@ -1627,6 +1627,4 @@ python () {
if broken_order:
oe.qa.handle_error("native-last", "%s: native/nativesdk class is not inherited last, this can result in unexpected behaviour. "
"Classes inherited after native/nativesdk: %s" % (pn, " ".join(broken_order)), d)
-
- oe.qa.exit_if_errors(d)
}
So far, failing the build when a QA error was raised happened implicitly when another (unrelated) caller called `exit_if_errors` (e.g. insane.bbclass's anonymous Python function). This is error prone and may also lead to inconsistent abortion behaviour when parsing QA errors are only raised later. Fix this by introducing an explicit call to `exit_if_errors` once recipe parsing has finished. Currently code in the following .bbclasses relies on insane.bbclass to call `exit_if_errors`: * license.bbclass * yocto-check-layer.bbclass Signed-off-by: Philip Lorenz <philip.lorenz@bmw.de> --- meta/classes-global/base.bbclass | 4 ++++ meta/classes-global/insane.bbclass | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-)