diff options
author | Gregor Zatko <gzatko@gmail.com> | 2020-05-24 12:24:04 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-06-05 21:36:30 +0100 |
commit | 6dc4f62bcc8688a55cf17e3f4f876da2859ef1f1 (patch) | |
tree | 94f0957eee1f479229dd0d0f4ace2aa0ea7875d7 | |
parent | 45c4dbf32e13d1c808e0fb6ec3ad84cfc394a356 (diff) | |
download | poky-6dc4f62bcc8688a55cf17e3f4f876da2859ef1f1.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]
(From OE-Core rev: bc6e27aeed5d536d2b764949c307f260f78b7810)
Signed-off-by: Gregor Zatko <gzatko@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 07bf9b460fe97dec86439302a83bbefa8bac9d70)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/sanity.bbclass | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass index 9e87101738..5ddde9cc9c 100644 --- a/meta/classes/sanity.bbclass +++ b/meta/classes/sanity.bbclass | |||
@@ -784,6 +784,12 @@ def check_sanity_everybuild(status, d): | |||
784 | if "." in paths or "./" in paths or "" in paths: | 784 | if "." in paths or "./" in paths or "" in paths: |
785 | status.addresult("PATH contains '.', './' or '' (empty element), which will break the build, please remove this.\nParsed PATH is " + str(paths) + "\n") | 785 | status.addresult("PATH contains '.', './' or '' (empty element), which will break the build, please remove this.\nParsed PATH is " + str(paths) + "\n") |
786 | 786 | ||
787 | # Check whether 'inherit' directive is found (used for a class to inherit) | ||
788 | # in conf file it's supposed to be uppercase INHERIT | ||
789 | inherit = d.getVar('inherit') | ||
790 | if inherit: | ||
791 | 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") | ||
792 | |||
787 | # Check that the DISTRO is valid, if set | 793 | # Check that the DISTRO is valid, if set |
788 | # need to take into account DISTRO renaming DISTRO | 794 | # need to take into account DISTRO renaming DISTRO |
789 | distro = d.getVar('DISTRO') | 795 | distro = d.getVar('DISTRO') |