We treat all WARN_QA as ERROR_QA by adding this line to the local.conf ERROR_QA:append = " ${WARN_QA}" In this case it would be the same as moving patch-fuzz into the ERROR_QA list. When there are patch-fuzz QA errors the build correctly fails however not before sstate is populated. Subsequent builds will then pass using the stored sstate entries. This patch is based on dunfell but almost identical patches could be applied to main. Other QA checks follow this same pattern checking for qa_sane before calling bb.fatal. +--- + meta/classes/insane.bbclass | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass +index eb19425..87431ae 100644 +--- a/meta/classes/insane.bbclass ++++ b/meta/classes/insane.bbclass +@@ -1169,6 +1169,9 @@ python do_qa_patch() { + bb.warn(msg) + msg = "Patch log indicates that patches do not apply cleanly." + package_qa_handle_error("patch-fuzz", msg, d) ++ qa_sane = d.getVar("QA_SANE") ++ if not qa_sane: ++ bb.fatal("Fatal QA errors found, failing task.") + } + + python do_qa_configure() { +-- +2.38.1 +
For your approach to work, you should also do: WARN_QA = "" The code should also check if there is any duplication in ERROR_QA and WARN_QA and if so, exit with an error most likely. Also see: #14620 which is usually how warnings get lost. Are you able to send a patch to the list to fix this?
Mathew, is this fixed in master now by: https://git.yoctoproject.org/poky/commit/meta/classes-global/insane.bbclass?id=3c3fd6a65e8103f74ae382d196d486b31a168b39 We don't think it's sensible to backport to previous branches. -- YP bug review