diff options
author | Mark Hatle <mark.hatle@windriver.com> | 2010-09-30 15:50:42 -0500 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-10-01 18:45:32 +0100 |
commit | dd81d5882bdc1cabfd5c91a3e71df047dd2cfa7a (patch) | |
tree | 2413988e6196dd07f8b3d30cf55ad37ee69f5afc /meta/classes | |
parent | 8e429accb89e098b5bdf4f090ff851a1d2dafbf7 (diff) | |
download | poky-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/classes')
-rw-r--r-- | meta/classes/insane.bbclass | 30 |
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): | |||
503 | # The PACKAGE FUNC to scan each package | 503 | # The PACKAGE FUNC to scan each package |
504 | python do_package_qa () { | 504 | python do_package_qa () { |
505 | bb.note("DO PACKAGE QA") | 505 | bb.note("DO PACKAGE QA") |
506 | |||
507 | logdir = bb.data.getVar('T', d, True) | ||
508 | pkg = bb.data.getVar('PN', d, True) | ||
509 | |||
510 | # Check the compile log for host contamination | ||
511 | compilelog = os.path.join(logdir,"log.do_compile") | ||
512 | |||
513 | statement = "grep -e 'CROSS COMPILE Badness:' -e 'is unsafe for cross-compilation' %s > /dev/null" % compilelog | ||
514 | if os.system(statement) == 0: | ||
515 | bb.warn("%s: The compile log indicates that host include and/or library paths were used. Please check the log '%s' for more information." % \ | ||
516 | (pkg, compilelog)) | ||
517 | |||
518 | |||
519 | # Check the install log for host contamination | ||
520 | installlog = os.path.join(logdir,"log.do_install") | ||
521 | |||
522 | statement = "grep -e 'CROSS COMPILE Badness:' -e 'is unsafe for cross-compilation' %s > /dev/null" % installlog | ||
523 | if os.system(statement) == 0: | ||
524 | bb.warn("%s: The install log indicates that host include and/or library paths were used. Please check the log '%s' for more information." % \ | ||
525 | (pkg, installlog)) | ||
526 | |||
527 | # Scan the packages... | ||
506 | pkgdest = bb.data.getVar('PKGDEST', d, True) | 528 | pkgdest = bb.data.getVar('PKGDEST', d, True) |
507 | packages = bb.data.getVar('PACKAGES',d, True) | 529 | packages = bb.data.getVar('PACKAGES',d, True) |
508 | 530 | ||
@@ -537,7 +559,8 @@ python do_package_qa () { | |||
537 | 559 | ||
538 | 560 | ||
539 | # The Staging Func, to check all staging | 561 | # The Staging Func, to check all staging |
540 | addtask qa_staging after do_populate_sysroot before do_build | 562 | #addtask qa_staging after do_populate_sysroot before do_build |
563 | do_populate_sysroot[postfunc] += "do_qa_staging" | ||
541 | python do_qa_staging() { | 564 | python do_qa_staging() { |
542 | bb.note("QA checking staging") | 565 | bb.note("QA checking staging") |
543 | 566 | ||
@@ -547,13 +570,14 @@ python do_qa_staging() { | |||
547 | 570 | ||
548 | # Check broken config.log files, for packages requiring Gettext which don't | 571 | # Check broken config.log files, for packages requiring Gettext which don't |
549 | # have it in DEPENDS and for correct LIC_FILES_CHKSUM | 572 | # have it in DEPENDS and for correct LIC_FILES_CHKSUM |
550 | addtask qa_configure after do_configure before do_compile | 573 | #addtask qa_configure after do_configure before do_compile |
574 | do_configure[postfunc] += "do_qa_configure" | ||
551 | python do_qa_configure() { | 575 | python do_qa_configure() { |
552 | configs = [] | 576 | configs = [] |
553 | workdir = bb.data.getVar('WORKDIR', d, True) | 577 | workdir = bb.data.getVar('WORKDIR', d, True) |
554 | bb.note("Checking autotools environment for common misconfiguration") | 578 | bb.note("Checking autotools environment for common misconfiguration") |
555 | for root, dirs, files in os.walk(workdir): | 579 | for root, dirs, files in os.walk(workdir): |
556 | statement = "grep 'CROSS COMPILE Badness:' %s > /dev/null" % \ | 580 | statement = "grep -e 'CROSS COMPILE Badness:' -e 'is unsafe for cross-compilation' %s > /dev/null" % \ |
557 | os.path.join(root,"config.log") | 581 | os.path.join(root,"config.log") |
558 | if "config.log" in files: | 582 | if "config.log" in files: |
559 | if os.system(statement) == 0: | 583 | if os.system(statement) == 0: |