summaryrefslogtreecommitdiffstats
path: root/meta/classes/insane.bbclass
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 11:53:36 +0100
commit377fe11bc0d6939ab1aaebab1bf4e55adca1ab15 (patch)
tree48b901be29dd26a49601585d11f725d329f98cb9 /meta/classes/insane.bbclass
parent3c53e0dfb2d41ab2c933764ecd5a56c5f43bf8eb (diff)
downloadopenembedded-core-377fe11bc0d6939ab1aaebab1bf4e55adca1ab15.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 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>
Diffstat (limited to 'meta/classes/insane.bbclass')
-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):
bb.note("Recipe %s skipping qa checking: pkgconfig" % d.getVar('PN'))
skip_pkgconfig = True
+ skip_shebang_size = False
+ if 'shebang-size' in skip:
+ bb.note("Recipe %s skipping qa checkking: shebang-size" % d.getVar('PN'))
+ skip_shebang_size = True
+
# find all .la and .pc files
# read the content
# and check for stuff that looks wrong
@@ -651,6 +656,13 @@ def qa_check_staged(path,d):
error_msg = "%s failed sanity test (tmpdir) in path %s" % (file,root)
oe.qa.handle_error("pkgconfig", error_msg, d)
+ if not skip_shebang_size:
+ errors = {}
+ package_qa_check_shebang_size(path, "", d, None, errors)
+ for e in errors:
+ oe.qa.handle_error(e, errors[e], d)
+
+
# Run all package-wide warnfuncs and errorfuncs
def package_qa_package(warnfuncs, errorfuncs, package, d):
warnings = {}
@@ -1139,7 +1151,9 @@ addtask do_package_qa_setscene
python do_qa_staging() {
bb.note("QA checking staging")
- qa_check_staged(d.expand('${SYSROOT_DESTDIR}${libdir}'), d)
+ sysroot_destdir = d.expand('${SYSROOT_DESTDIR}')
+ for sysroot_dir in d.expand('${SYSROOT_DIRS}').split():
+ qa_check_staged(sysroot_destdir + sysroot_dir, d)
oe.qa.exit_with_message_if_errors("QA staging was broken by the package built above", d)
}