summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorJacob Kroon <jacob.kroon@gmail.com>2020-06-10 17:52:45 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-10-06 13:15:21 (GMT)
commit460802161013f276b9ee5ce0ddc35799d39202fc (patch)
treef2960735f229b5714d31af02d792880d71fc720f /meta/classes
parent9f8853f2b58e603416ba15290a5d94beb8673d02 (diff)
downloadpoky-460802161013f276b9ee5ce0ddc35799d39202fc.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: 02fa8637195447f38b4ce96086197490ce814987) Signed-off-by: Jacob Kroon <jacob.kroon@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit c06489d102682504afe33f9fee3facd9628b3f57) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-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 46d386a..5b18fad 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -28,7 +28,7 @@ WARN_QA ?= "ldflags useless-rpaths rpaths staticdev libdir xorg-driver-abi \
28 pn-overrides infodir build-deps src-uri-bad \ 28 pn-overrides infodir build-deps src-uri-bad \
29 unknown-configure-option symlink-to-sysroot multilib \ 29 unknown-configure-option symlink-to-sysroot multilib \
30 invalid-packageconfig host-user-contaminated uppercase-pn patch-fuzz \ 30 invalid-packageconfig host-user-contaminated uppercase-pn patch-fuzz \
31 mime mime-xdg unlisted-pkg-lics \ 31 mime mime-xdg unlisted-pkg-lics unhandled-features-check \
32 " 32 "
33ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch pkgconfig la \ 33ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch pkgconfig la \
34 perms dep-cmp pkgvarcheck perm-config perm-line perm-link \ 34 perms dep-cmp pkgvarcheck perm-config perm-line perm-link \
@@ -977,6 +977,16 @@ def package_qa_check_src_uri(pn, d, messages):
977 if re.search(r"github\.com/.+/.+/archive/.+", url): 977 if re.search(r"github\.com/.+/.+/archive/.+", url):
978 package_qa_handle_error("src-uri-bad", "%s: SRC_URI uses unstable GitHub archives" % pn, d) 978 package_qa_handle_error("src-uri-bad", "%s: SRC_URI uses unstable GitHub archives" % pn, d)
979 979
980QARECIPETEST[unhandled-features-check] = "package_qa_check_unhandled_features_check"
981def package_qa_check_unhandled_features_check(pn, d, messages):
982 if not bb.data.inherits_class('features_check', d):
983 var_set = False
984 for kind in ['DISTRO', 'MACHINE', 'COMBINED']:
985 for var in ['ANY_OF_' + kind + '_FEATURES', 'REQUIRED_' + kind + '_FEATURES', 'CONFLICT_' + kind + '_FEATURES']:
986 if d.getVar(var) is not None or d.overridedata.get(var) is not None:
987 var_set = True
988 if var_set:
989 package_qa_handle_error("unhandled-features-check", "%s: recipe doesn't inherit features_check" % pn, d)
980 990
981# The PACKAGE FUNC to scan each package 991# The PACKAGE FUNC to scan each package
982python do_package_qa () { 992python do_package_qa () {