summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGregor Zatko <gzatko@gmail.com>2020-05-24 12:24:04 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-05-24 23:55:31 +0100
commit07bf9b460fe97dec86439302a83bbefa8bac9d70 (patch)
tree46a0b83ca2a40b364f99b5e39779d14162510e61
parent3d5aa170d2e88b852bd2a4452aab9311a24badef (diff)
downloadopenembedded-core-07bf9b460fe97dec86439302a83bbefa8bac9d70.tar.gz
sanity.bbclass: Detect and fail if 'inherit' is used in conf file
'inherit' directive may not be used in conf files as it's supposed to be used for the inheritance of classes. Correct form in conf file is INHERIT. This commit adds: - a sanity check to find whether the wrong case exists - fail the build if so - tell user about the difference in directives [YOCTO #5426] Signed-off-by: Gregor Zatko <gzatko@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/sanity.bbclass6
1 files changed, 6 insertions, 0 deletions
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index 292c5591dd..e021b9d240 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -784,6 +784,12 @@ def check_sanity_everybuild(status, d):
if "." in paths or "./" in paths or "" in paths:
status.addresult("PATH contains '.', './' or '' (empty element), which will break the build, please remove this.\nParsed PATH is " + str(paths) + "\n")
+ # Check whether 'inherit' directive is found (used for a class to inherit)
+ # in conf file it's supposed to be uppercase INHERIT
+ inherit = d.getVar('inherit')
+ if inherit:
+ status.addresult("Please don't use inherit directive in your local.conf. The directive is supposed to be used in classes and recipes only to inherit of bbclasses. Here INHERIT should be used.\n")
+
# Check that the DISTRO is valid, if set
# need to take into account DISTRO renaming DISTRO
distro = d.getVar('DISTRO')