mirror of
https://git.yoctoproject.org/poky
synced 2026-06-01 13:09:50 +00:00
insane.bbclass: add a SUMMARY/HOMEPAGE check (oe-core recipes only)
This was done in a selftest, but that is too late and creates friction in integration as errors are not seen until autobuilder fails. Bonus fix: SUMMARY check wasn't even working, as in the absence of one set in the recipe there is a default value set from bitbake.conf. I left DESCRIPTION check out for now, as many recipes don't actually have it, and it's set from SUMMARY (plus a dot) if absent. (From OE-Core rev: 4144c2f43da39336b03cfd612cbe1694cbf8c7bd) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
2c7a4a8021
commit
ba961128e2
@@ -50,6 +50,7 @@ ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch pkgconfig la \
|
||||
# Add usrmerge QA check based on distro feature
|
||||
ERROR_QA:append = "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', ' usrmerge', '', d)}"
|
||||
ERROR_QA:append:layer-core = " patch-status"
|
||||
WARN_QA:append:layer-core = " missing-metadata"
|
||||
|
||||
FAKEROOT_QA = "host-user-contaminated"
|
||||
FAKEROOT_QA[doc] = "QA tests which need to run under fakeroot. If any \
|
||||
@@ -1470,6 +1471,21 @@ python do_qa_unpack() {
|
||||
}
|
||||
|
||||
python do_recipe_qa() {
|
||||
def test_missing_metadata(d):
|
||||
fn = d.getVar("FILE")
|
||||
pn = d.getVar('BPN')
|
||||
srcfile = d.getVar('SRC_URI').split()
|
||||
# Check that SUMMARY is not the same as the default from bitbake.conf
|
||||
if d.getVar('SUMMARY') == d.expand("${PN} version ${PV}-${PR}"):
|
||||
oe.qa.handle_error("missing-metadata", "Recipe {} in {} does not contain a SUMMARY. Please add an entry.".format(pn, fn), d)
|
||||
if not d.getVar('HOMEPAGE'):
|
||||
if srcfile and srcfile[0].startswith('file') or not d.getVar('SRC_URI'):
|
||||
# We are only interested in recipes SRC_URI fetched from external sources
|
||||
pass
|
||||
else:
|
||||
oe.qa.handle_error("missing-metadata", "Recipe {} in {} does not contain a HOMEPAGE. Please add an entry.".format(pn, fn), d)
|
||||
|
||||
test_missing_metadata(d)
|
||||
oe.qa.exit_if_errors(d)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user