From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: openembedded-core <openembedded-core@lists.openembedded.org>
Cc: Igor Stoppa <igor.stoppa@intel.com>
Subject: [PATCH] insane/package: Fix cases where QA errors aren't fatal
Date: Tue, 12 Jan 2016 18:00:13 +0000 [thread overview]
Message-ID: <1452621613.28375.21.camel@linuxfoundation.org> (raw)
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}"
reply other threads:[~2016-01-12 18:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1452621613.28375.21.camel@linuxfoundation.org \
--to=richard.purdie@linuxfoundation.org \
--cc=igor.stoppa@intel.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox