mirror of
https://git.yoctoproject.org/poky
synced 2026-05-08 17:19:20 +00:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
89d289ee85
commit
9549a9ea3f
@@ -26,7 +26,7 @@ WARN_QA ?= " libdir xorg-driver-abi \
|
|||||||
textrel incompatible-license files-invalid \
|
textrel incompatible-license files-invalid \
|
||||||
infodir build-deps src-uri-bad symlink-to-sysroot multilib \
|
infodir build-deps src-uri-bad symlink-to-sysroot multilib \
|
||||||
invalid-packageconfig host-user-contaminated uppercase-pn patch-fuzz \
|
invalid-packageconfig host-user-contaminated uppercase-pn patch-fuzz \
|
||||||
mime mime-xdg unlisted-pkg-lics \
|
mime mime-xdg unlisted-pkg-lics unhandled-features-check \
|
||||||
"
|
"
|
||||||
ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch pkgconfig la \
|
ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch pkgconfig la \
|
||||||
perms dep-cmp pkgvarcheck perm-config perm-line perm-link \
|
perms dep-cmp pkgvarcheck perm-config perm-line perm-link \
|
||||||
@@ -980,6 +980,16 @@ def package_qa_check_src_uri(pn, d, messages):
|
|||||||
if re.search(r"github\.com/.+/.+/archive/.+", url):
|
if re.search(r"github\.com/.+/.+/archive/.+", url):
|
||||||
package_qa_handle_error("src-uri-bad", "%s: SRC_URI uses unstable GitHub archives" % pn, d)
|
package_qa_handle_error("src-uri-bad", "%s: SRC_URI uses unstable GitHub archives" % pn, d)
|
||||||
|
|
||||||
|
QARECIPETEST[unhandled-features-check] = "package_qa_check_unhandled_features_check"
|
||||||
|
def package_qa_check_unhandled_features_check(pn, d, messages):
|
||||||
|
if not bb.data.inherits_class('features_check', d):
|
||||||
|
var_set = False
|
||||||
|
for kind in ['DISTRO', 'MACHINE', 'COMBINED']:
|
||||||
|
for var in ['ANY_OF_' + kind + '_FEATURES', 'REQUIRED_' + kind + '_FEATURES', 'CONFLICT_' + kind + '_FEATURES']:
|
||||||
|
if d.getVar(var) is not None or d.overridedata.get(var) is not None:
|
||||||
|
var_set = True
|
||||||
|
if var_set:
|
||||||
|
package_qa_handle_error("unhandled-features-check", "%s: recipe doesn't inherit features_check" % pn, d)
|
||||||
|
|
||||||
# The PACKAGE FUNC to scan each package
|
# The PACKAGE FUNC to scan each package
|
||||||
python do_package_qa () {
|
python do_package_qa () {
|
||||||
|
|||||||
Reference in New Issue
Block a user