Patchwork [4/4] insane.bbclass: quiet package errors not in *_QA

login
register
mail settings
Submitter Christopher Larson
Date June 10, 2013, 8:47 p.m.
Message ID <5af88b588ebad66b9e123e80c745be0210eee9f0.1370896990.git.chris_larson@mentor.com>
Download mbox | patch
Permalink /patch/51451/
State Accepted
Commit d4a7820eee932c9796920e9453be68f9b7eb8ade
Headers show

Comments

Christopher Larson - June 10, 2013, 8:47 p.m.
From: Christopher Larson <chris_larson@mentor.com>

Currently, if a package QA type from package.bbclass is not listed in
ERROR_QA, it gets shown, regardless of whether it's in WARN_QA. This differs
from the behavior of the rest of the QA handling (which doesn't call
package_qa_handle_error at all if it's in neither _QA variable), and is
nonintuitive. Change this to use bb.note() if it's listed neither in ERROR_QA
nor WARN_QA, so it ends up in the task logs, but doesn't clutter up the user's
output.

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
---
 meta/classes/insane.bbclass | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
Otavio Salvador - June 10, 2013, 9:05 p.m.
On Mon, Jun 10, 2013 at 5:47 PM, Christopher Larson <kergoth@gmail.com>wrote:

> From: Christopher Larson <chris_larson@mentor.com>
>
> Currently, if a package QA type from package.bbclass is not listed in
> ERROR_QA, it gets shown, regardless of whether it's in WARN_QA. This
> differs
> from the behavior of the rest of the QA handling (which doesn't call
> package_qa_handle_error at all if it's in neither _QA variable), and is
> nonintuitive. Change this to use bb.note() if it's listed neither in
> ERROR_QA
> nor WARN_QA, so it ends up in the task logs, but doesn't clutter up the
> user's
> output.
>
> Signed-off-by: Christopher Larson <chris_larson@mentor.com>
>


Reviewed-by: Otavio Salvador <otavio@ossystems.com.br>

Patch

diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index c091005..2b30538 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -143,9 +143,11 @@  def package_qa_handle_error(error_class, error_msg, d):
         bb.error("QA Issue: %s" % error_msg)
         d.setVar("QA_SANE", False)
         return False
-    else:
+    elif error_class in (d.getVar("WARN_QA", True) or "").split():
         bb.warn("QA Issue: %s" % error_msg)
-        return True
+    else:
+        bb.note("QA Issue: %s" % error_msg)
+    return True
 
 QAPATHTEST[libexec] = "package_qa_check_libexec"
 def package_qa_check_libexec(path,name, d, elf, messages):