insane/package: Fix cases where QA errors aren't fatal

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]

(From OE-Core rev: 7e36d13212763fe409747aba011c020c9aeba6d7)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie
2016-01-12 18:00:13 +00:00
parent 2e620a4785
commit ea29bec6c7
2 changed files with 7 additions and 0 deletions

View 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.")
}

View 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}"