summaryrefslogtreecommitdiffstats
path: root/meta/classes/insane.bbclass
diff options
context:
space:
mode:
authorJacob Kroon <jacob.kroon@gmail.com>2020-06-10 19:52:45 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-06-12 08:25:05 +0100
commit9549a9ea3f8c81fccbfc2df5bb37397166dcbfe3 (patch)
tree7fe0b800e7a1d4c7910ed23d325fe2d59cad2c09 /meta/classes/insane.bbclass
parent89d289ee85adbebf621619741b5fcd562ad9902d (diff)
downloadpoky-9549a9ea3f8c81fccbfc2df5bb37397166dcbfe3.tar.gz
insane: Check for feature check variables not being used
Add a package QA check for wether any of the variables used by features_check.bbclass is set while not inheriting the class itself. (From OE-Core rev: c06489d102682504afe33f9fee3facd9628b3f57) Signed-off-by: Jacob Kroon <jacob.kroon@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/insane.bbclass')
-rw-r--r--meta/classes/insane.bbclass12
1 files changed, 11 insertions, 1 deletions
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index b7c613880b..649aea1da1 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -26,7 +26,7 @@ WARN_QA ?= " libdir xorg-driver-abi \
26 textrel incompatible-license files-invalid \ 26 textrel incompatible-license files-invalid \
27 infodir build-deps src-uri-bad symlink-to-sysroot multilib \ 27 infodir build-deps src-uri-bad symlink-to-sysroot multilib \
28 invalid-packageconfig host-user-contaminated uppercase-pn patch-fuzz \ 28 invalid-packageconfig host-user-contaminated uppercase-pn patch-fuzz \
29 mime mime-xdg unlisted-pkg-lics \ 29 mime mime-xdg unlisted-pkg-lics unhandled-features-check \
30 " 30 "
31ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch pkgconfig la \ 31ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch pkgconfig la \
32 perms dep-cmp pkgvarcheck perm-config perm-line perm-link \ 32 perms dep-cmp pkgvarcheck perm-config perm-line perm-link \
@@ -980,6 +980,16 @@ def package_qa_check_src_uri(pn, d, messages):
980 if re.search(r"github\.com/.+/.+/archive/.+", url): 980 if re.search(r"github\.com/.+/.+/archive/.+", url):
981 package_qa_handle_error("src-uri-bad", "%s: SRC_URI uses unstable GitHub archives" % pn, d) 981 package_qa_handle_error("src-uri-bad", "%s: SRC_URI uses unstable GitHub archives" % pn, d)
982 982
983QARECIPETEST[unhandled-features-check] = "package_qa_check_unhandled_features_check"
984def package_qa_check_unhandled_features_check(pn, d, messages):
985 if not bb.data.inherits_class('features_check', d):
986 var_set = False
987 for kind in ['DISTRO', 'MACHINE', 'COMBINED']:
988 for var in ['ANY_OF_' + kind + '_FEATURES', 'REQUIRED_' + kind + '_FEATURES', 'CONFLICT_' + kind + '_FEATURES']:
989 if d.getVar(var) is not None or d.overridedata.get(var) is not None:
990 var_set = True
991 if var_set:
992 package_qa_handle_error("unhandled-features-check", "%s: recipe doesn't inherit features_check" % pn, d)
983 993
984# The PACKAGE FUNC to scan each package 994# The PACKAGE FUNC to scan each package
985python do_package_qa () { 995python do_package_qa () {