diff options
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/insane.bbclass | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass index 0bc6492c83..9ca84bace9 100644 --- a/meta/classes/insane.bbclass +++ b/meta/classes/insane.bbclass | |||
@@ -1201,18 +1201,20 @@ python do_qa_patch() { | |||
1201 | if '/meta/' not in fullpath: | 1201 | if '/meta/' not in fullpath: |
1202 | continue | 1202 | continue |
1203 | 1203 | ||
1204 | content = open(fullpath, encoding='utf-8', errors='ignore').read() | ||
1205 | kinda_status_re = re.compile(r"^.*upstream.*status.*$", re.IGNORECASE | re.MULTILINE) | 1204 | kinda_status_re = re.compile(r"^.*upstream.*status.*$", re.IGNORECASE | re.MULTILINE) |
1206 | strict_status_re = re.compile(r"^Upstream-Status: (Pending|Submitted|Denied|Accepted|Inappropriate|Backport|Inactive-Upstream)( .+)?$", re.MULTILINE) | 1205 | strict_status_re = re.compile(r"^Upstream-Status: (Pending|Submitted|Denied|Accepted|Inappropriate|Backport|Inactive-Upstream)( .+)?$", re.MULTILINE) |
1207 | match_kinda = kinda_status_re.search(content) | ||
1208 | match_strict = strict_status_re.search(content) | ||
1209 | guidelines = "https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines#Patch_Header_Recommendations:_Upstream-Status" | 1206 | guidelines = "https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines#Patch_Header_Recommendations:_Upstream-Status" |
1210 | 1207 | ||
1211 | if not match_strict: | 1208 | with open(fullpath, encoding='utf-8', errors='ignore') as f: |
1212 | if match_kinda: | 1209 | file_content = f.read() |
1213 | bb.error("Malformed Upstream-Status in patch\n%s\nPlease correct according to %s :\n%s" % (fullpath, guidelines, match_kinda.group(0))) | 1210 | match_kinda = kinda_status_re.search(file_content) |
1214 | else: | 1211 | match_strict = strict_status_re.search(file_content) |
1215 | bb.error("Missing Upstream-Status in patch\n%s\nPlease add according to %s ." % (fullpath, guidelines)) | 1212 | |
1213 | if not match_strict: | ||
1214 | 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))) | ||
1216 | else: | ||
1217 | bb.error("Missing Upstream-Status in patch\n%s\nPlease add according to %s ." % (fullpath, guidelines)) | ||
1216 | } | 1218 | } |
1217 | 1219 | ||
1218 | python do_qa_configure() { | 1220 | python do_qa_configure() { |