Message ID | 20220606155807.1414519-1-ptsneves@gmail.com |
---|---|
State | Accepted, archived |
Commit | 377fe11bc0d6939ab1aaebab1bf4e55adca1ab15 |
Headers | show |
Series | [1/3] insane.bbclass: Make do_qa_staging check shebangs | expand |
> + 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) Where is package_qa_check_shebang_size() defined? Ross IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
Never mind, can’t read :) > On 15 Jun 2022, at 12:07, Ross Burton <Ross.Burton@arm.com> wrote: > >> + 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) > > Where is package_qa_check_shebang_size() defined? > > Ross IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
:) The function should probably be refactored so it does not imply it is only useful for packaging. Paulo Neves On 6/15/22 13:08, Ross Burton wrote: > Never mind, can’t read :) > >> On 15 Jun 2022, at 12:07, Ross Burton <Ross.Burton@arm.com> wrote: >> >>> + 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) >> Where is package_qa_check_shebang_size() defined? >> >> Ross > IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass index 9ca84bace9..dd0cf2a769 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(os.path.join(sysroot_destdir, sysroot_dir), d) oe.qa.exit_with_message_if_errors("QA staging was broken by the package built above", d) }