<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>14991</bug_id>
          
          <creation_ts>2022-12-16 00:10:38 +0000</creation_ts>
          <short_desc>When forcing WARN_QA as ERROR_QA patch-fuzz QA checks are not fatal</short_desc>
          <delta_ts>2023-06-22 15:12:01 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>Meta-yocto</product>
          <component>meta-yocto</component>
          <version>4.2</version>
          <rep_platform>All</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>4.3 M2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Mathew Prokos">mathew.prokos</reporter>
          <assigned_to name="Mathew Prokos">mathew.prokos</assigned_to>
          <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>randy.macleod</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>New (Never tested)</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>94541</commentid>
    <comment_count>0</comment_count>
    <who name="Mathew Prokos">mathew.prokos</who>
    <bug_when>2022-12-16 00:10:38 +0000</bug_when>
    <thetext>We treat all WARN_QA as ERROR_QA by adding this line to the local.conf

ERROR_QA:append = &quot; ${WARN_QA}&quot;

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 = &quot;Patch log indicates that patches do not apply cleanly.&quot;
+             package_qa_handle_error(&quot;patch-fuzz&quot;, msg, d)
++    qa_sane = d.getVar(&quot;QA_SANE&quot;)
++    if not qa_sane:
++        bb.fatal(&quot;Fatal QA errors found, failing task.&quot;)
+ }
+
+ python do_qa_configure() {
+--
+2.38.1
+</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>94574</commentid>
    <comment_count>1</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2022-12-22 15:37:31 +0000</bug_when>
    <thetext>For your approach to work, you should also do:
WARN_QA = &quot;&quot;

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?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95805</commentid>
    <comment_count>2</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2023-06-22 15:12:01 +0000</bug_when>
    <thetext>Mathew, is this fixed in master now by:
https://git.yoctoproject.org/poky/commit/meta/classes-global/insane.bbclass?id=3c3fd6a65e8103f74ae382d196d486b31a168b39

We don&apos;t think it&apos;s sensible to backport to previous branches. 
-- YP bug review</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>