diff options
author | Robert Yang <liezhi.yang@windriver.com> | 2019-03-07 11:41:21 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-03-07 21:55:29 +0000 |
commit | b25608d4917aad45514a163f386e965938b0b83d (patch) | |
tree | ddc1e279c09f0d4ccaf808b1cca6ab533b32f1f8 /meta/classes/insane.bbclass | |
parent | 856d6207550f7e4993e76ba6f928d69d7acd32b8 (diff) | |
download | poky-b25608d4917aad45514a163f386e965938b0b83d.tar.gz |
insane.bbclass: Make INSANE_SKIP work for qa pkgconfig and la
The INSANE_SKIP = "pkgconfig" or "la" didn't work, this patch fixes the problem.
[YOCTO #13087]
(From OE-Core rev: 756d6419f10d388c5daa63b7607e580d8b5079f1)
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/insane.bbclass')
-rw-r--r-- | meta/classes/insane.bbclass | 20 |
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 | ||
573 | def package_qa_check_staged(path,d): | 573 | def 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 | ||
1035 | python do_qa_staging() { | 1046 | python 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 | ||