summaryrefslogtreecommitdiffstats
path: root/meta/classes/insane.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/insane.bbclass')
-rw-r--r--meta/classes/insane.bbclass20
1 files changed, 19 insertions, 1 deletions
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index 31d28ca6d4..538cc140ee 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -439,6 +439,19 @@ def package_qa_check_rdepends(pkg, workdir, d):
439 439
440 return sane 440 return sane
441 441
442def configure_qa_check_gettext(d):
443 # Check to see if gettext is required and if so whether it's in DEPENDS
444 # Returning False means we need gettext but don't have it in DEPENDS
445 deps = bb.utils.explode_deps(bb.data.getVar('DEPENDS', d, True) or "")
446 if "gettext" in deps:
447 return True
448
449 check = "grep \"^[[:space:]]*AM_GNU_GETTEXT\" $CONFIGURE_AC >/dev/null"
450 if os.system(check) == 0:
451 return True
452 else:
453 return False
454
442# The PACKAGE FUNC to scan each package 455# The PACKAGE FUNC to scan each package
443python do_package_qa () { 456python do_package_qa () {
444 bb.note("DO PACKAGE QA") 457 bb.note("DO PACKAGE QA")
@@ -481,9 +494,14 @@ python do_qa_staging() {
481 bb.fatal("QA staging was broken by the package built above") 494 bb.fatal("QA staging was broken by the package built above")
482} 495}
483 496
484# Check broken config.log files 497# Check broken config.log files & for packages requiring Gettext which don't
498# have it in DEPENDS
485addtask qa_configure after do_configure before do_compile 499addtask qa_configure after do_configure before do_compile
486python do_qa_configure() { 500python do_qa_configure() {
501 bb.note("Checking for gettext requirement")
502 if not configure_qa_check_gettext(d):
503 bb.fatal("Gettext required by configure but not in DEPENDS")
504
487 bb.note("Checking sanity of the config.log file") 505 bb.note("Checking sanity of the config.log file")
488 for root, dirs, files in os.walk(bb.data.getVar('WORKDIR', d, True)): 506 for root, dirs, files in os.walk(bb.data.getVar('WORKDIR', d, True)):
489 statement = "grep 'CROSS COMPILE Badness:' %s > /dev/null" % \ 507 statement = "grep 'CROSS COMPILE Badness:' %s > /dev/null" % \