aboutsummaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2010-09-30 15:50:42 -0500
committerRichard Purdie <rpurdie@linux.intel.com>2010-10-01 18:45:32 +0100
commitdd81d5882bdc1cabfd5c91a3e71df047dd2cfa7a (patch)
tree2413988e6196dd07f8b3d30cf55ad37ee69f5afc /meta
parent8e429accb89e098b5bdf4f090ff851a1d2dafbf7 (diff)
downloadopenembedded-core-contrib-dd81d5882bdc1cabfd5c91a3e71df047dd2cfa7a.tar.gz
insane: Update the insane class to check for host contamination
[BUGID #376] Update to the insane class to detect the new gcc and binutils poison messages located within the config.log. (Continue to scan for the old style message.) Add a new compile and install log check to the package_qa that scans the logs for the same types of messages "unsafe for cross-compilation". Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/insane.bbclass30
1 files changed, 27 insertions, 3 deletions
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index f59860b18b..2696a6fc08 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -503,6 +503,28 @@ def package_qa_check_rdepends(pkg, pkgdest, d):
# The PACKAGE FUNC to scan each package
python do_package_qa () {
bb.note("DO PACKAGE QA")
+
+ logdir = bb.data.getVar('T', d, True)
+ pkg = bb.data.getVar('PN', d, True)
+
+ # Check the compile log for host contamination
+ compilelog = os.path.join(logdir,"log.do_compile")
+
+ statement = "grep -e 'CROSS COMPILE Badness:' -e 'is unsafe for cross-compilation' %s > /dev/null" % compilelog
+ if os.system(statement) == 0:
+ bb.warn("%s: The compile log indicates that host include and/or library paths were used. Please check the log '%s' for more information." % \
+ (pkg, compilelog))
+
+
+ # Check the install log for host contamination
+ installlog = os.path.join(logdir,"log.do_install")
+
+ statement = "grep -e 'CROSS COMPILE Badness:' -e 'is unsafe for cross-compilation' %s > /dev/null" % installlog
+ if os.system(statement) == 0:
+ bb.warn("%s: The install log indicates that host include and/or library paths were used. Please check the log '%s' for more information." % \
+ (pkg, installlog))
+
+ # Scan the packages...
pkgdest = bb.data.getVar('PKGDEST', d, True)
packages = bb.data.getVar('PACKAGES',d, True)
@@ -537,7 +559,8 @@ python do_package_qa () {
# The Staging Func, to check all staging
-addtask qa_staging after do_populate_sysroot before do_build
+#addtask qa_staging after do_populate_sysroot before do_build
+do_populate_sysroot[postfunc] += "do_qa_staging"
python do_qa_staging() {
bb.note("QA checking staging")
@@ -547,13 +570,14 @@ python do_qa_staging() {
# Check broken config.log files, for packages requiring Gettext which don't
# have it in DEPENDS and for correct LIC_FILES_CHKSUM
-addtask qa_configure after do_configure before do_compile
+#addtask qa_configure after do_configure before do_compile
+do_configure[postfunc] += "do_qa_configure"
python do_qa_configure() {
configs = []
workdir = bb.data.getVar('WORKDIR', d, True)
bb.note("Checking autotools environment for common misconfiguration")
for root, dirs, files in os.walk(workdir):
- statement = "grep 'CROSS COMPILE Badness:' %s > /dev/null" % \
+ statement = "grep -e 'CROSS COMPILE Badness:' -e 'is unsafe for cross-compilation' %s > /dev/null" % \
os.path.join(root,"config.log")
if "config.log" in files:
if os.system(statement) == 0: