summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/insane.bbclass20
1 files changed, 15 insertions, 5 deletions
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index 6411884f92..2fd0ecc24b 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -570,7 +570,7 @@ python populate_lic_qa_checksum() {
570 bb.fatal("Fatal QA errors found, failing task.") 570 bb.fatal("Fatal QA errors found, failing task.")
571} 571}
572 572
573def package_qa_check_staged(path,d): 573def qa_check_staged(path,d):
574 """ 574 """
575 Check staged la and pc files for common problems like references to the work 575 Check staged la and pc files for common problems like references to the work
576 directory. 576 directory.
@@ -589,20 +589,31 @@ def package_qa_check_staged(path,d):
589 else: 589 else:
590 pkgconfigcheck = tmpdir 590 pkgconfigcheck = tmpdir
591 591
592 skip = (d.getVar('INSANE_SKIP') or "").split()
593 skip_la = False
594 if 'la' in skip:
595 bb.note("Recipe %s skipping qa checking: la" % d.getVar('PN'))
596 skip_la = True
597
598 skip_pkgconfig = False
599 if 'pkgconfig' in skip:
600 bb.note("Recipe %s skipping qa checking: pkgconfig" % d.getVar('PN'))
601 skip_pkgconfig = True
602
592 # find all .la and .pc files 603 # find all .la and .pc files
593 # read the content 604 # read the content
594 # and check for stuff that looks wrong 605 # and check for stuff that looks wrong
595 for root, dirs, files in os.walk(path): 606 for root, dirs, files in os.walk(path):
596 for file in files: 607 for file in files:
597 path = os.path.join(root,file) 608 path = os.path.join(root,file)
598 if file.endswith(".la"): 609 if file.endswith(".la") and not skip_la:
599 with open(path) as f: 610 with open(path) as f:
600 file_content = f.read() 611 file_content = f.read()
601 file_content = file_content.replace(recipesysroot, "") 612 file_content = file_content.replace(recipesysroot, "")
602 if workdir in file_content: 613 if workdir in file_content:
603 error_msg = "%s failed sanity test (workdir) in path %s" % (file,root) 614 error_msg = "%s failed sanity test (workdir) in path %s" % (file,root)
604 sane &= package_qa_handle_error("la", error_msg, d) 615 sane &= package_qa_handle_error("la", error_msg, d)
605 elif file.endswith(".pc"): 616 elif file.endswith(".pc") and not skip_pkgconfig:
606 with open(path) as f: 617 with open(path) as f:
607 file_content = f.read() 618 file_content = f.read()
608 file_content = file_content.replace(recipesysroot, "") 619 file_content = file_content.replace(recipesysroot, "")
@@ -1034,8 +1045,7 @@ addtask do_package_qa_setscene
1034 1045
1035python do_qa_staging() { 1046python do_qa_staging() {
1036 bb.note("QA checking staging") 1047 bb.note("QA checking staging")
1037 1048 if not qa_check_staged(d.expand('${SYSROOT_DESTDIR}${libdir}'), d):
1038 if not package_qa_check_staged(d.expand('${SYSROOT_DESTDIR}${libdir}'), d):
1039 bb.fatal("QA staging was broken by the package built above") 1049 bb.fatal("QA staging was broken by the package built above")
1040} 1050}
1041 1051