diff options
| author | Mike Crowe <mac@mcrowe.com> | 2021-10-15 15:39:53 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-10-17 11:56:32 +0100 |
| commit | 51b1611e204b32b3e65176ef86d4562e2f330835 (patch) | |
| tree | 7845a123d2eddbc2c9d5f9f72e1c2be9c2dea730 /meta/classes/multilib.bbclass | |
| parent | 25675706b6339b6a11e69dbad1c885a4b79fc57c (diff) | |
| download | poky-51b1611e204b32b3e65176ef86d4562e2f330835.tar.gz | |
lib/oe/qa,insane: Move extra error handling functions to library
Extract package_qa_write_error, package_qa_handle_error and
package_qa_add_message functions from insane.bbclass to lib/oe/qa.py and
drop the package_qa_ prefixes.
Update various bbclasses to use the new functions. No import is required
since base.bbclass puts oe.qa in OE_IMPORTS.
Stop requiring callers to manually track whether a fatal error has been
encountered via a "sane" flag. Instead replace the QA_SANE variable with
QA_ERRORS_FOUND and call oe.qa.exit_if_errors or
oe.qa.exit_with_message_if_errors at the end of each task.
Inspired by discussion resulting from
https://lists.openembedded.org/g/openembedded-core/message/156793 and
https://lists.openembedded.org/g/openembedded-core/message/156900
(From OE-Core rev: f0ad152ef4cc15c042bc9eeefb6af096d054b220)
Signed-off-by: Mike Crowe <mac@mcrowe.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/multilib.bbclass')
| -rw-r--r-- | meta/classes/multilib.bbclass | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/meta/classes/multilib.bbclass b/meta/classes/multilib.bbclass index b210c49c0c..73ad2ab7b3 100644 --- a/meta/classes/multilib.bbclass +++ b/meta/classes/multilib.bbclass | |||
| @@ -210,7 +210,7 @@ python do_package_qa_multilib() { | |||
| 210 | if len(candidates) > 0: | 210 | if len(candidates) > 0: |
| 211 | msg = "%s package %s - suspicious values '%s' in %s" \ | 211 | msg = "%s package %s - suspicious values '%s' in %s" \ |
| 212 | % (d.getVar('PN'), pkg, ' '.join(candidates), var) | 212 | % (d.getVar('PN'), pkg, ' '.join(candidates), var) |
| 213 | package_qa_handle_error("multilib", msg, d) | 213 | oe.qa.handle_error("multilib", msg, d) |
| 214 | 214 | ||
| 215 | ml = d.getVar('MLPREFIX') | 215 | ml = d.getVar('MLPREFIX') |
| 216 | if not ml: | 216 | if not ml: |
| @@ -228,4 +228,5 @@ python do_package_qa_multilib() { | |||
| 228 | check_mlprefix(pkg, 'RSUGGESTS', ml) | 228 | check_mlprefix(pkg, 'RSUGGESTS', ml) |
| 229 | check_mlprefix(pkg, 'RREPLACES', ml) | 229 | check_mlprefix(pkg, 'RREPLACES', ml) |
| 230 | check_mlprefix(pkg, 'RCONFLICTS', ml) | 230 | check_mlprefix(pkg, 'RCONFLICTS', ml) |
| 231 | oe.qa.exit_if_errors(d) | ||
| 231 | } | 232 | } |
