mirror of
https://git.yoctoproject.org/poky
synced 2026-02-07 09:16:36 +01:00
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:
@@ -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.")
|
||||
}
|
||||
|
||||
@@ -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}"
|
||||
|
||||
Reference in New Issue
Block a user