summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/insane.bbclass23
1 files changed, 15 insertions, 8 deletions
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index f4b4c05e3d..99340c1752 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -1182,24 +1182,27 @@ python do_qa_patch() {
1182 msg += " devtool modify %s\n" % d.getVar('PN') 1182 msg += " devtool modify %s\n" % d.getVar('PN')
1183 msg += " devtool finish --force-patch-refresh %s <layer_path>\n\n" % d.getVar('PN') 1183 msg += " devtool finish --force-patch-refresh %s <layer_path>\n\n" % d.getVar('PN')
1184 msg += "Don't forget to review changes done by devtool!\n" 1184 msg += "Don't forget to review changes done by devtool!\n"
1185 if bb.utils.filter('ERROR_QA', 'patch-fuzz', d): 1185 msg += "\nPatch log indicates that patches do not apply cleanly."
1186 bb.error(msg)
1187 elif bb.utils.filter('WARN_QA', 'patch-fuzz', d):
1188 bb.warn(msg)
1189 msg = "Patch log indicates that patches do not apply cleanly."
1190 oe.qa.handle_error("patch-fuzz", msg, d) 1186 oe.qa.handle_error("patch-fuzz", msg, d)
1191 1187
1192 # Check if the patch contains a correctly formatted and spelled Upstream-Status 1188 # Check if the patch contains a correctly formatted and spelled Upstream-Status
1193 import re 1189 import re
1194 from oe import patch 1190 from oe import patch
1195 1191
1192 allpatches = False
1193 if bb.utils.filter('ERROR_QA', 'patch-status-noncore', d) or bb.utils.filter('WARN_QA', 'patch-status-noncore', d):
1194 allpatches = True
1195
1196 coremeta_path = os.path.join(d.getVar('COREBASE'), 'meta', '') 1196 coremeta_path = os.path.join(d.getVar('COREBASE'), 'meta', '')
1197 for url in patch.src_patches(d): 1197 for url in patch.src_patches(d):
1198 (_, _, fullpath, _, _, _) = bb.fetch.decodeurl(url) 1198 (_, _, fullpath, _, _, _) = bb.fetch.decodeurl(url)
1199 1199
1200 # skip patches not in oe-core 1200 # skip patches not in oe-core
1201 patchtype = "patch-status-core"
1201 if not os.path.abspath(fullpath).startswith(coremeta_path): 1202 if not os.path.abspath(fullpath).startswith(coremeta_path):
1202 continue 1203 patchtype = "patch-status-noncore"
1204 if not allpatches:
1205 continue
1203 1206
1204 kinda_status_re = re.compile(r"^.*upstream.*status.*$", re.IGNORECASE | re.MULTILINE) 1207 kinda_status_re = re.compile(r"^.*upstream.*status.*$", re.IGNORECASE | re.MULTILINE)
1205 strict_status_re = re.compile(r"^Upstream-Status: (Pending|Submitted|Denied|Accepted|Inappropriate|Backport|Inactive-Upstream)( .+)?$", re.MULTILINE) 1208 strict_status_re = re.compile(r"^Upstream-Status: (Pending|Submitted|Denied|Accepted|Inappropriate|Backport|Inactive-Upstream)( .+)?$", re.MULTILINE)
@@ -1212,9 +1215,13 @@ python do_qa_patch() {
1212 1215
1213 if not match_strict: 1216 if not match_strict:
1214 if match_kinda: 1217 if match_kinda:
1215 bb.error("Malformed Upstream-Status in patch\n%s\nPlease correct according to %s :\n%s" % (fullpath, guidelines, match_kinda.group(0))) 1218 msg = "Malformed Upstream-Status in patch\n%s\nPlease correct according to %s :\n%s" % (fullpath, guidelines, match_kinda.group(0))
1219 oe.qa.handle_error(patchtype, msg, d)
1216 else: 1220 else:
1217 bb.error("Missing Upstream-Status in patch\n%s\nPlease add according to %s ." % (fullpath, guidelines)) 1221 msg = "Missing Upstream-Status in patch\n%s\nPlease add according to %s ." % (fullpath, guidelines)
1222 oe.qa.handle_error(patchtype, msg, d)
1223
1224 oe.qa.exit_if_errors(d)
1218} 1225}
1219 1226
1220python do_qa_configure() { 1227python do_qa_configure() {