summaryrefslogtreecommitdiffstats
path: root/meta
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-30 11:14:25 +0100
commit749f54530fa65a5de996c3e0a41e9528020d84d9 (patch)
treee98b76e9eb79f8a564c8ef787e961171cb4af973 /meta
parent94fe1dd8b65f1948d3c4d520e7bef9586cb784cf (diff)
downloadpoky-749f54530fa65a5de996c3e0a41e9528020d84d9.tar.gz
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] (From OE-Core rev: 4713f8b2c4f2c74239d284adcf1e59e61aa66576) Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-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 @@
16# into exec_prefix 16# into exec_prefix
17# -Check that scripts in base_[bindir|sbindir|libdir] do not reference 17# -Check that scripts in base_[bindir|sbindir|libdir] do not reference
18# files under exec_prefix 18# files under exec_prefix
19 19# -Check if the package name is upper case
20 20
21QA_SANE = "True" 21QA_SANE = "True"
22 22
@@ -27,7 +27,7 @@ WARN_QA ?= "ldflags useless-rpaths rpaths staticdev libdir xorg-driver-abi \
27 installed-vs-shipped compile-host-path install-host-path \ 27 installed-vs-shipped compile-host-path install-host-path \
28 pn-overrides infodir build-deps \ 28 pn-overrides infodir build-deps \
29 unknown-configure-option symlink-to-sysroot multilib \ 29 unknown-configure-option symlink-to-sysroot multilib \
30 invalid-packageconfig host-user-contaminated \ 30 invalid-packageconfig host-user-contaminated uppercase-pn \
31 " 31 "
32ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch pkgconfig la \ 32ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch pkgconfig la \
33 perms dep-cmp pkgvarcheck perm-config perm-line perm-link \ 33 perms dep-cmp pkgvarcheck perm-config perm-line perm-link \
@@ -1248,6 +1248,8 @@ do_configure[postfuncs] += "do_qa_configure "
1248do_unpack[postfuncs] += "do_qa_unpack" 1248do_unpack[postfuncs] += "do_qa_unpack"
1249 1249
1250python () { 1250python () {
1251 import re
1252
1251 tests = d.getVar('ALL_QA').split() 1253 tests = d.getVar('ALL_QA').split()
1252 if "desktop" in tests: 1254 if "desktop" in tests:
1253 d.appendVar("PACKAGE_DEPENDS", " desktop-file-utils-native") 1255 d.appendVar("PACKAGE_DEPENDS", " desktop-file-utils-native")
@@ -1274,6 +1276,9 @@ python () {
1274 if pn in overrides: 1276 if pn in overrides:
1275 msg = 'Recipe %s has PN of "%s" which is in OVERRIDES, this can result in unexpected behaviour.' % (d.getVar("FILE"), pn) 1277 msg = 'Recipe %s has PN of "%s" which is in OVERRIDES, this can result in unexpected behaviour.' % (d.getVar("FILE"), pn)
1276 package_qa_handle_error("pn-overrides", msg, d) 1278 package_qa_handle_error("pn-overrides", msg, d)
1279 prog = re.compile('[A-Z]')
1280 if prog.search(pn):
1281 package_qa_handle_error("uppercase-pn", 'PN: %s is upper case, this can result in unexpected behavior.' % pn, d)
1277 1282
1278 issues = [] 1283 issues = []
1279 if (d.getVar('PACKAGES') or "").split(): 1284 if (d.getVar('PACKAGES') or "").split():