diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-01-12 18:00:13 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-01-15 11:54:51 +0000 |
commit | ea29bec6c7bf08cd862b45703bfb8be3ca129d1e (patch) | |
tree | 2d24a829fc63679b38dd824df64e53381c97f0bf | |
parent | 2e620a4785bf3f3c787e4005911513d9474b9904 (diff) | |
download | poky-ea29bec6c7bf08cd862b45703bfb8be3ca129d1e.tar.gz |
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>
-rw-r--r-- | meta/classes/insane.bbclass | 3 | ||||
-rw-r--r-- | meta/classes/package.bbclass | 4 |
2 files changed, 7 insertions, 0 deletions
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass index bf6a598484..ba9c6511fd 100644 --- a/meta/classes/insane.bbclass +++ b/meta/classes/insane.bbclass | |||
@@ -1285,4 +1285,7 @@ python () { | |||
1285 | d.setVarFlag('do_package_qa', 'rdeptask', '') | 1285 | d.setVarFlag('do_package_qa', 'rdeptask', '') |
1286 | for i in issues: | 1286 | for i in issues: |
1287 | package_qa_handle_error("pkgvarcheck", "%s: Variable %s is set as not being package specific, please fix this." % (d.getVar("FILE", True), i), d) | 1287 | package_qa_handle_error("pkgvarcheck", "%s: Variable %s is set as not being package specific, please fix this." % (d.getVar("FILE", True), i), d) |
1288 | qa_sane = d.getVar("QA_SANE", True) | ||
1289 | if not qa_sane: | ||
1290 | bb.fatal("Fatal QA errors found, failing task.") | ||
1288 | } | 1291 | } |
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass index 54f7ae55cf..fdcf5ff179 100644 --- a/meta/classes/package.bbclass +++ b/meta/classes/package.bbclass | |||
@@ -2052,6 +2052,10 @@ python do_package () { | |||
2052 | 2052 | ||
2053 | for f in (d.getVar('PACKAGEFUNCS', True) or '').split(): | 2053 | for f in (d.getVar('PACKAGEFUNCS', True) or '').split(): |
2054 | bb.build.exec_func(f, d) | 2054 | bb.build.exec_func(f, d) |
2055 | |||
2056 | qa_sane = d.getVar("QA_SANE", True) | ||
2057 | if not qa_sane: | ||
2058 | bb.fatal("Fatal QA errors found, failing task.") | ||
2055 | } | 2059 | } |
2056 | 2060 | ||
2057 | do_package[dirs] = "${SHLIBSWORKDIR} ${PKGDESTWORK} ${D}" | 2061 | do_package[dirs] = "${SHLIBSWORKDIR} ${PKGDESTWORK} ${D}" |