1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-30 00:20:08 +00:00

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>
This commit is contained in:
Richard Purdie
2023-06-19 14:40:55 +01:00
parent 42921e63a4
commit 6b26715fd7
3 changed files with 5 additions and 13 deletions
+3 -13
View File
@@ -44,10 +44,11 @@ ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch pkgconfig la \
already-stripped installed-vs-shipped ldflags compile-host-path \
install-host-path pn-overrides unknown-configure-option \
useless-rpaths rpaths staticdev empty-dirs \
patch-fuzz patch-status-core\
patch-fuzz \
"
# Add usrmerge QA check based on distro feature
ERROR_QA:append = "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', ' usrmerge', '', d)}"
ERROR_QA:append:layer-core = " patch-status"
FAKEROOT_QA = "host-user-contaminated"
FAKEROOT_QA[doc] = "QA tests which need to run under fakeroot. If any \
@@ -1334,24 +1335,13 @@ python do_qa_patch() {
import re
from oe import patch
allpatches = False
if bb.utils.filter('ERROR_QA', 'patch-status-noncore', d) or bb.utils.filter('WARN_QA', 'patch-status-noncore', d):
allpatches = True
coremeta_path = os.path.join(d.getVar('COREBASE'), 'meta', '')
for url in patch.src_patches(d):
(_, _, fullpath, _, _, _) = bb.fetch.decodeurl(url)
# skip patches not in oe-core
patchtype = "patch-status-core"
if not os.path.abspath(fullpath).startswith(coremeta_path):
patchtype = "patch-status-noncore"
if not allpatches:
continue
msg = oe.qa.check_upstream_status(fullpath)
if msg:
oe.qa.handle_error(patchtype, msg, d)
oe.qa.handle_error("patch-status", msg, d)
oe.qa.exit_if_errors(d)
}