diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-06-19 14:40:55 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-06-20 23:24:26 +0100 |
commit | 6b26715fd7f660bf0ec8fad5bda6d866854fdc5f (patch) | |
tree | 3c566ed84e0b6a1c2757f81042308b419b7da105 /meta/classes-global | |
parent | 42921e63a4969bde69d608afd497071341423d13 (diff) | |
download | poky-6b26715fd7f660bf0ec8fad5bda6d866854fdc5f.tar.gz |
insane: Improve patch-status layer filtering
Now that we have layer overrides, we can easily enable patch-status in
ERROR_QA without the hardcoded code making it easier for other layers
to opt into the checks.
(From OE-Core rev: 61a881fdbe8b5a21c6276b8a5d06cc30486b1eb3)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes-global')
-rw-r--r-- | meta/classes-global/insane.bbclass | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/meta/classes-global/insane.bbclass b/meta/classes-global/insane.bbclass index 8788f58fc5..a4dbc9a123 100644 --- a/meta/classes-global/insane.bbclass +++ b/meta/classes-global/insane.bbclass | |||
@@ -44,10 +44,11 @@ ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch pkgconfig la \ | |||
44 | already-stripped installed-vs-shipped ldflags compile-host-path \ | 44 | already-stripped installed-vs-shipped ldflags compile-host-path \ |
45 | install-host-path pn-overrides unknown-configure-option \ | 45 | install-host-path pn-overrides unknown-configure-option \ |
46 | useless-rpaths rpaths staticdev empty-dirs \ | 46 | useless-rpaths rpaths staticdev empty-dirs \ |
47 | patch-fuzz patch-status-core\ | 47 | patch-fuzz \ |
48 | " | 48 | " |
49 | # Add usrmerge QA check based on distro feature | 49 | # Add usrmerge QA check based on distro feature |
50 | ERROR_QA:append = "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', ' usrmerge', '', d)}" | 50 | ERROR_QA:append = "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', ' usrmerge', '', d)}" |
51 | ERROR_QA:append:layer-core = " patch-status" | ||
51 | 52 | ||
52 | FAKEROOT_QA = "host-user-contaminated" | 53 | FAKEROOT_QA = "host-user-contaminated" |
53 | FAKEROOT_QA[doc] = "QA tests which need to run under fakeroot. If any \ | 54 | FAKEROOT_QA[doc] = "QA tests which need to run under fakeroot. If any \ |
@@ -1334,24 +1335,13 @@ python do_qa_patch() { | |||
1334 | import re | 1335 | import re |
1335 | from oe import patch | 1336 | from oe import patch |
1336 | 1337 | ||
1337 | allpatches = False | ||
1338 | if bb.utils.filter('ERROR_QA', 'patch-status-noncore', d) or bb.utils.filter('WARN_QA', 'patch-status-noncore', d): | ||
1339 | allpatches = True | ||
1340 | |||
1341 | coremeta_path = os.path.join(d.getVar('COREBASE'), 'meta', '') | 1338 | coremeta_path = os.path.join(d.getVar('COREBASE'), 'meta', '') |
1342 | for url in patch.src_patches(d): | 1339 | for url in patch.src_patches(d): |
1343 | (_, _, fullpath, _, _, _) = bb.fetch.decodeurl(url) | 1340 | (_, _, fullpath, _, _, _) = bb.fetch.decodeurl(url) |
1344 | 1341 | ||
1345 | # skip patches not in oe-core | ||
1346 | patchtype = "patch-status-core" | ||
1347 | if not os.path.abspath(fullpath).startswith(coremeta_path): | ||
1348 | patchtype = "patch-status-noncore" | ||
1349 | if not allpatches: | ||
1350 | continue | ||
1351 | |||
1352 | msg = oe.qa.check_upstream_status(fullpath) | 1342 | msg = oe.qa.check_upstream_status(fullpath) |
1353 | if msg: | 1343 | if msg: |
1354 | oe.qa.handle_error(patchtype, msg, d) | 1344 | oe.qa.handle_error("patch-status", msg, d) |
1355 | 1345 | ||
1356 | oe.qa.exit_if_errors(d) | 1346 | oe.qa.exit_if_errors(d) |
1357 | } | 1347 | } |