@@ -28,6 +28,7 @@ WARN_QA ?= " libdir xorg-driver-abi \
missing-update-alternatives native-last missing-ptest \
license-exists license-no-generic license-syntax license-format \
license-incompatible license-file-missing obsolete-license \
+ patch-status-noncore \
"
ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch pkgconfig la \
perms dep-cmp pkgvarcheck perm-config perm-line perm-link \
@@ -1182,24 +1183,27 @@ python do_qa_patch() {
msg += " devtool modify %s\n" % d.getVar('PN')
msg += " devtool finish --force-patch-refresh %s <layer_path>\n\n" % d.getVar('PN')
msg += "Don't forget to review changes done by devtool!\n"
- if bb.utils.filter('ERROR_QA', 'patch-fuzz', d):
- bb.error(msg)
- elif bb.utils.filter('WARN_QA', 'patch-fuzz', d):
- bb.warn(msg)
- msg = "Patch log indicates that patches do not apply cleanly."
+ msg += "\nPatch log indicates that patches do not apply cleanly."
oe.qa.handle_error("patch-fuzz", msg, d)
# Check if the patch contains a correctly formatted and spelled Upstream-Status
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):
- continue
+ patchtype = "patch-status-noncore"
+ if not allpatches:
+ continue
kinda_status_re = re.compile(r"^.*upstream.*status.*$", re.IGNORECASE | re.MULTILINE)
strict_status_re = re.compile(r"^Upstream-Status: (Pending|Submitted|Denied|Accepted|Inappropriate|Backport|Inactive-Upstream)( .+)?$", re.MULTILINE)
@@ -1212,9 +1216,13 @@ python do_qa_patch() {
if not match_strict:
if match_kinda:
- bb.error("Malformed Upstream-Status in patch\n%s\nPlease correct according to %s :\n%s" % (fullpath, guidelines, match_kinda.group(0)))
+ msg = "Malformed Upstream-Status in patch\n%s\nPlease correct according to %s :\n%s" % (fullpath, guidelines, match_kinda.group(0))
+ oe.qa.handle_error(patchtype, msg, d)
else:
- bb.error("Missing Upstream-Status in patch\n%s\nPlease add according to %s ." % (fullpath, guidelines))
+ msg = "Missing Upstream-Status in patch\n%s\nPlease add according to %s ." % (fullpath, guidelines)
+ oe.qa.handle_error(patchtype, msg, d)
+
+ oe.qa.exit_if_errors(d)
}
python do_qa_configure() {