diff options
| -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: |
