diff options
Diffstat (limited to 'meta/classes/insane.bbclass')
-rw-r--r-- | meta/classes/insane.bbclass | 33 |
1 files changed, 22 insertions, 11 deletions
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass index ee57721634..c0910057f7 100644 --- a/meta/classes/insane.bbclass +++ b/meta/classes/insane.bbclass | |||
@@ -27,6 +27,20 @@ QADEPENDS_class-native = "" | |||
27 | QADEPENDS_class-nativesdk = "" | 27 | QADEPENDS_class-nativesdk = "" |
28 | QA_SANE = "True" | 28 | QA_SANE = "True" |
29 | 29 | ||
30 | # Elect whether a given type of error is a warning or error, they may | ||
31 | # have been set by other files. | ||
32 | WARN_QA ?= "ldflags useless-rpaths rpaths staticdev libdir xorg-driver-abi \ | ||
33 | textrel already-stripped incompatible-license files-invalid \ | ||
34 | installed-vs-shipped compile-host-path install-host-path \ | ||
35 | pn-overrides \ | ||
36 | " | ||
37 | ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch la2 pkgconfig la \ | ||
38 | perms dep-cmp pkgvarcheck perm-config perm-line perm-link \ | ||
39 | split-strip packages-list pkgv-undefined var-undefined \ | ||
40 | " | ||
41 | |||
42 | ALL_QA = "${WARN_QA} ${ERROR_QA}" | ||
43 | |||
30 | # | 44 | # |
31 | # dictionary for elf headers | 45 | # dictionary for elf headers |
32 | # | 46 | # |
@@ -111,12 +125,6 @@ def package_qa_get_machine_dict(): | |||
111 | } | 125 | } |
112 | 126 | ||
113 | 127 | ||
114 | # Currently not being used by default "desktop" | ||
115 | WARN_QA ?= "ldflags useless-rpaths rpaths staticdev libdir xorg-driver-abi textrel" | ||
116 | ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch la2 pkgconfig la perms dep-cmp pkgvarcheck" | ||
117 | |||
118 | ALL_QA = "${WARN_QA} ${ERROR_QA}" | ||
119 | |||
120 | def package_qa_clean_path(path,d): | 128 | def package_qa_clean_path(path,d): |
121 | """ Remove the common prefix from the path. In this case it is the TMPDIR""" | 129 | """ Remove the common prefix from the path. In this case it is the TMPDIR""" |
122 | return path.replace(d.getVar('TMPDIR',True),"") | 130 | return path.replace(d.getVar('TMPDIR',True),"") |
@@ -757,8 +765,9 @@ python do_package_qa () { | |||
757 | if os.path.exists(compilelog): | 765 | if os.path.exists(compilelog): |
758 | statement = "grep -e 'CROSS COMPILE Badness:' -e 'is unsafe for cross-compilation' %s > /dev/null" % compilelog | 766 | statement = "grep -e 'CROSS COMPILE Badness:' -e 'is unsafe for cross-compilation' %s > /dev/null" % compilelog |
759 | if subprocess.call(statement, shell=True) == 0: | 767 | if subprocess.call(statement, shell=True) == 0: |
760 | bb.warn("%s: The compile log indicates that host include and/or library paths were used.\n \ | 768 | msg = "%s: The compile log indicates that host include and/or library paths were used.\n \ |
761 | Please check the log '%s' for more information." % (pkg, compilelog)) | 769 | Please check the log '%s' for more information." % (pkg, compilelog) |
770 | package_qa_handle_error("compile-host-path", msg, d) | ||
762 | 771 | ||
763 | # Check the install log for host contamination | 772 | # Check the install log for host contamination |
764 | installlog = os.path.join(logdir,"log.do_install") | 773 | installlog = os.path.join(logdir,"log.do_install") |
@@ -766,8 +775,9 @@ python do_package_qa () { | |||
766 | if os.path.exists(installlog): | 775 | if os.path.exists(installlog): |
767 | statement = "grep -e 'CROSS COMPILE Badness:' -e 'is unsafe for cross-compilation' %s > /dev/null" % installlog | 776 | statement = "grep -e 'CROSS COMPILE Badness:' -e 'is unsafe for cross-compilation' %s > /dev/null" % installlog |
768 | if subprocess.call(statement, shell=True) == 0: | 777 | if subprocess.call(statement, shell=True) == 0: |
769 | bb.warn("%s: The install log indicates that host include and/or library paths were used.\n \ | 778 | msg = "%s: The install log indicates that host include and/or library paths were used.\n \ |
770 | Please check the log '%s' for more information." % (pkg, installlog)) | 779 | Please check the log '%s' for more information." % (pkg, installlog) |
780 | package_qa_handle_error("install-host-path", msg, d) | ||
771 | 781 | ||
772 | # Scan the packages... | 782 | # Scan the packages... |
773 | pkgdest = d.getVar('PKGDEST', True) | 783 | pkgdest = d.getVar('PKGDEST', True) |
@@ -911,7 +921,8 @@ python () { | |||
911 | overrides = d.getVar('OVERRIDES', True).split(':') | 921 | overrides = d.getVar('OVERRIDES', True).split(':') |
912 | pn = d.getVar('PN', True) | 922 | pn = d.getVar('PN', True) |
913 | if pn in overrides: | 923 | if pn in overrides: |
914 | bb.warn('Recipe %s has PN of "%s" which is in OVERRIDES, this can result in unexpected behaviour.' % (d.getVar("FILE", True), pn)) | 924 | msg = 'Recipe %s has PN of "%s" which is in OVERRIDES, this can result in unexpected behaviour.' % (d.getVar("FILE", True), pn) |
925 | package_qa_handle_error("pn-overrides", msg, d) | ||
915 | 926 | ||
916 | issues = [] | 927 | issues = [] |
917 | if (d.getVar('PACKAGES', True) or "").split(): | 928 | if (d.getVar('PACKAGES', True) or "").split(): |