]> code.ossystems Code Review - openembedded-core.git/commitdiff
insane/package: Fix cases where QA errors aren't fatal
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 12 Jan 2016 18:00:13 +0000 (18:00 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 13 Jan 2016 00:09:00 +0000 (00:09 +0000)
When using package_qa_handle_error(), we need to check QA_SANE and
give a fatal error if issues were raised. The main insane checks do
this, the anonymous python in insane does not, nor does the code in
package.bbclass. This was likely missed when the function was
introduced to package.bbclass.

The impact is that errors can be shown but don't stop the build
(do_package succeeds), the initial build fails due to the errors
shown but subsequent builds succeed. This is clearly broken.

The solution is to check QA_SANE in places we use the handle_error
function.

[YOCTO #8907]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/insane.bbclass
meta/classes/package.bbclass

index bf6a598484fb53796f9d9d67ce9c70f49dfdc405..ba9c6511fd3ce70849401560998154499e128960 100644 (file)
@@ -1285,4 +1285,7 @@ python () {
         d.setVarFlag('do_package_qa', 'rdeptask', '')
     for i in issues:
         package_qa_handle_error("pkgvarcheck", "%s: Variable %s is set as not being package specific, please fix this." % (d.getVar("FILE", True), i), d)
+    qa_sane = d.getVar("QA_SANE", True)
+    if not qa_sane:
+        bb.fatal("Fatal QA errors found, failing task.")
 }
index 54f7ae55cf4b6e4d14fa8b4c267791d84ace3637..fdcf5ff179e048a111e831d80a5013c75dee5091 100644 (file)
@@ -2052,6 +2052,10 @@ python do_package () {
 
     for f in (d.getVar('PACKAGEFUNCS', True) or '').split():
         bb.build.exec_func(f, d)
+
+    qa_sane = d.getVar("QA_SANE", True)
+    if not qa_sane:
+        bb.fatal("Fatal QA errors found, failing task.")
 }
 
 do_package[dirs] = "${SHLIBSWORKDIR} ${PKGDESTWORK} ${D}"