diff options
| -rw-r--r-- | meta/classes/insane.bbclass | 9 |
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 | ||
| 21 | QA_SANE = "True" | 21 | QA_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 | " |
| 32 | ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch pkgconfig la \ | 32 | ERROR_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 " | |||
| 1248 | do_unpack[postfuncs] += "do_qa_unpack" | 1248 | do_unpack[postfuncs] += "do_qa_unpack" |
| 1249 | 1249 | ||
| 1250 | python () { | 1250 | python () { |
| 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(): |
