summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaulo Neves <ptsneves@gmail.com>2022-06-14 17:11:01 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-07-01 12:37:52 +0100
commit82589b5936df1b0ad55ebd5961f3943d33f8bacc (patch)
tree88283ca1a66bb480b2931e3aeddf66aa0eeb20df
parent241a27ea80968329625463213f76a5c5880a33e8 (diff)
downloadpoky-82589b5936df1b0ad55ebd5961f3943d33f8bacc.tar.gz
insane.bbclass: Make do_qa_staging check shebangs
As reported in the bug report [1], there was no check for shebang sizes on native scripts and now this is fixed. The path scope of the qa_staging was increased from just checking libdir to all the relevant SYSROOT_DIRS. It is possible to skip this check through INSANE_SKIP. [1] https://bugzilla.yoctoproject.org/show_bug.cgi?id=11053 (From OE-Core rev: 377fe11bc0d6939ab1aaebab1bf4e55adca1ab15) Signed-off-by: Paulo Neves <ptsneves@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/insane.bbclass16
1 files changed, 15 insertions, 1 deletions
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index 6f6dcb3dd5..e6b0f081e6 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -630,6 +630,11 @@ def qa_check_staged(path,d):
630 bb.note("Recipe %s skipping qa checking: pkgconfig" % d.getVar('PN')) 630 bb.note("Recipe %s skipping qa checking: pkgconfig" % d.getVar('PN'))
631 skip_pkgconfig = True 631 skip_pkgconfig = True
632 632
633 skip_shebang_size = False
634 if 'shebang-size' in skip:
635 bb.note("Recipe %s skipping qa checkking: shebang-size" % d.getVar('PN'))
636 skip_shebang_size = True
637
633 # find all .la and .pc files 638 # find all .la and .pc files
634 # read the content 639 # read the content
635 # and check for stuff that looks wrong 640 # and check for stuff that looks wrong
@@ -651,6 +656,13 @@ def qa_check_staged(path,d):
651 error_msg = "%s failed sanity test (tmpdir) in path %s" % (file,root) 656 error_msg = "%s failed sanity test (tmpdir) in path %s" % (file,root)
652 oe.qa.handle_error("pkgconfig", error_msg, d) 657 oe.qa.handle_error("pkgconfig", error_msg, d)
653 658
659 if not skip_shebang_size:
660 errors = {}
661 package_qa_check_shebang_size(path, "", d, None, errors)
662 for e in errors:
663 oe.qa.handle_error(e, errors[e], d)
664
665
654# Run all package-wide warnfuncs and errorfuncs 666# Run all package-wide warnfuncs and errorfuncs
655def package_qa_package(warnfuncs, errorfuncs, package, d): 667def package_qa_package(warnfuncs, errorfuncs, package, d):
656 warnings = {} 668 warnings = {}
@@ -1139,7 +1151,9 @@ addtask do_package_qa_setscene
1139 1151
1140python do_qa_staging() { 1152python do_qa_staging() {
1141 bb.note("QA checking staging") 1153 bb.note("QA checking staging")
1142 qa_check_staged(d.expand('${SYSROOT_DESTDIR}${libdir}'), d) 1154 sysroot_destdir = d.expand('${SYSROOT_DESTDIR}')
1155 for sysroot_dir in d.expand('${SYSROOT_DIRS}').split():
1156 qa_check_staged(sysroot_destdir + sysroot_dir, d)
1143 oe.qa.exit_with_message_if_errors("QA staging was broken by the package built above", d) 1157 oe.qa.exit_with_message_if_errors("QA staging was broken by the package built above", d)
1144} 1158}
1145 1159