* [PATCH] insane/package: Fix cases where QA errors aren't fatal
@ 2016-01-12 18:00 Richard Purdie
0 siblings, 0 replies; only message in thread
From: Richard Purdie @ 2016-01-12 18:00 UTC (permalink / raw)
To: openembedded-core; +Cc: Igor Stoppa
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>
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index bf6a598..ba9c651 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -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.")
}
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 54f7ae5..fdcf5ff 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -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}"
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2016-01-12 18:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-12 18:00 [PATCH] insane/package: Fix cases where QA errors aren't fatal Richard Purdie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox