summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYeoh Ee Peng <ee.peng.yeoh@intel.com>2017-08-28 12:02:01 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-08-29 12:23:04 +0100
commit4713f8b2c4f2c74239d284adcf1e59e61aa66576 (patch)
tree6a8cb1d21cad586c2e3898fba854d90acb6bdddb
parent74d41b4870bec88015c079444daad0a68f69abe9 (diff)
downloadopenembedded-core-contrib-4713f8b2c4f2c74239d284adcf1e59e61aa66576.tar.gz
openembedded-core-contrib-4713f8b2c4f2c74239d284adcf1e59e61aa66576.tar.bz2
openembedded-core-contrib-4713f8b2c4f2c74239d284adcf1e59e61aa66576.zip
insane: add qa check for uppercase recipe name
Since we disabled uppercase characters in overrides a few releases ago, uppercase characters in recipe names (and for that matter, distro and machine names) cannot be supported due to their reliance upon overrides including the name. QA check will produce an warning message when it verify that recipe name is uppercase. [YOCTO# 11592] Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/insane.bbclass9
1 files changed, 7 insertions, 2 deletions
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index b7177c9b32..fe0d744eb3 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -16,7 +16,7 @@
# into exec_prefix
# -Check that scripts in base_[bindir|sbindir|libdir] do not reference
# files under exec_prefix
-
+# -Check if the package name is upper case
QA_SANE = "True"
@@ -27,7 +27,7 @@ WARN_QA ?= "ldflags useless-rpaths rpaths staticdev libdir xorg-driver-abi \
installed-vs-shipped compile-host-path install-host-path \
pn-overrides infodir build-deps \
unknown-configure-option symlink-to-sysroot multilib \
- invalid-packageconfig host-user-contaminated \
+ invalid-packageconfig host-user-contaminated uppercase-pn \
"
ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch pkgconfig la \
perms dep-cmp pkgvarcheck perm-config perm-line perm-link \
@@ -1248,6 +1248,8 @@ do_configure[postfuncs] += "do_qa_configure "
do_unpack[postfuncs] += "do_qa_unpack"
python () {
+ import re
+
tests = d.getVar('ALL_QA').split()
if "desktop" in tests:
d.appendVar("PACKAGE_DEPENDS", " desktop-file-utils-native")
@@ -1274,6 +1276,9 @@ python () {
if pn in overrides:
msg = 'Recipe %s has PN of "%s" which is in OVERRIDES, this can result in unexpected behaviour.' % (d.getVar("FILE"), pn)
package_qa_handle_error("pn-overrides", msg, d)
+ prog = re.compile('[A-Z]')
+ if prog.search(pn):
+ package_qa_handle_error("uppercase-pn", 'PN: %s is upper case, this can result in unexpected behavior.' % pn, d)
issues = []
if (d.getVar('PACKAGES') or "").split():