summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/lib/oe/patch.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/meta/lib/oe/patch.py b/meta/lib/oe/patch.py
index 0332f100f1..dbefd28e67 100644
--- a/meta/lib/oe/patch.py
+++ b/meta/lib/oe/patch.py
@@ -428,6 +428,7 @@ class GitApplyTree(PatchTree):
428 def extractPatches(tree, startcommit, outdir, paths=None): 428 def extractPatches(tree, startcommit, outdir, paths=None):
429 import tempfile 429 import tempfile
430 import shutil 430 import shutil
431 import re
431 tempdir = tempfile.mkdtemp(prefix='oepatch') 432 tempdir = tempfile.mkdtemp(prefix='oepatch')
432 try: 433 try:
433 shellcmd = ["git", "format-patch", startcommit, "-o", tempdir] 434 shellcmd = ["git", "format-patch", startcommit, "-o", tempdir]
@@ -443,10 +444,13 @@ class GitApplyTree(PatchTree):
443 try: 444 try:
444 with open(srcfile, 'r', encoding=encoding) as f: 445 with open(srcfile, 'r', encoding=encoding) as f:
445 for line in f: 446 for line in f:
446 if line.startswith(GitApplyTree.patch_line_prefix): 447 checkline = line
448 if checkline.startswith('Subject: '):
449 checkline = re.sub(r'\[.+?\]\s*', '', checkline[9:])
450 if checkline.startswith(GitApplyTree.patch_line_prefix):
447 outfile = line.split()[-1].strip() 451 outfile = line.split()[-1].strip()
448 continue 452 continue
449 if line.startswith(GitApplyTree.ignore_commit_prefix): 453 if checkline.startswith(GitApplyTree.ignore_commit_prefix):
450 continue 454 continue
451 patchlines.append(line) 455 patchlines.append(line)
452 except UnicodeDecodeError: 456 except UnicodeDecodeError: