diff options
Diffstat (limited to 'meta/classes-global/insane.bbclass')
-rw-r--r-- | meta/classes-global/insane.bbclass | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/meta/classes-global/insane.bbclass b/meta/classes-global/insane.bbclass index 148ae4b7ad..78506c30b1 100644 --- a/meta/classes-global/insane.bbclass +++ b/meta/classes-global/insane.bbclass | |||
@@ -50,6 +50,7 @@ ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch pkgconfig la \ | |||
50 | # Add usrmerge QA check based on distro feature | 50 | # Add usrmerge QA check based on distro feature |
51 | ERROR_QA:append = "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', ' usrmerge', '', d)}" | 51 | ERROR_QA:append = "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', ' usrmerge', '', d)}" |
52 | ERROR_QA:append:layer-core = " patch-status" | 52 | ERROR_QA:append:layer-core = " patch-status" |
53 | WARN_QA:append:layer-core = " missing-metadata" | ||
53 | 54 | ||
54 | FAKEROOT_QA = "host-user-contaminated" | 55 | FAKEROOT_QA = "host-user-contaminated" |
55 | FAKEROOT_QA[doc] = "QA tests which need to run under fakeroot. If any \ | 56 | FAKEROOT_QA[doc] = "QA tests which need to run under fakeroot. If any \ |
@@ -1470,6 +1471,21 @@ python do_qa_unpack() { | |||
1470 | } | 1471 | } |
1471 | 1472 | ||
1472 | python do_recipe_qa() { | 1473 | python do_recipe_qa() { |
1474 | def test_missing_metadata(d): | ||
1475 | fn = d.getVar("FILE") | ||
1476 | pn = d.getVar('BPN') | ||
1477 | srcfile = d.getVar('SRC_URI').split() | ||
1478 | # Check that SUMMARY is not the same as the default from bitbake.conf | ||
1479 | if d.getVar('SUMMARY') == d.expand("${PN} version ${PV}-${PR}"): | ||
1480 | oe.qa.handle_error("missing-metadata", "Recipe {} in {} does not contain a SUMMARY. Please add an entry.".format(pn, fn), d) | ||
1481 | if not d.getVar('HOMEPAGE'): | ||
1482 | if srcfile and srcfile[0].startswith('file') or not d.getVar('SRC_URI'): | ||
1483 | # We are only interested in recipes SRC_URI fetched from external sources | ||
1484 | pass | ||
1485 | else: | ||
1486 | oe.qa.handle_error("missing-metadata", "Recipe {} in {} does not contain a HOMEPAGE. Please add an entry.".format(pn, fn), d) | ||
1487 | |||
1488 | test_missing_metadata(d) | ||
1473 | oe.qa.exit_if_errors(d) | 1489 | oe.qa.exit_if_errors(d) |
1474 | } | 1490 | } |
1475 | 1491 | ||