summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe/patch.py
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2014-12-19 11:41:45 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-12-21 12:37:56 +0000
commite03c04758b5599e2ac7a3eb20954b81fcb4cf3d3 (patch)
treee1968747772f1a5217a030e6547fd901e6895e9c /meta/lib/oe/patch.py
parentde8730ce2dd4d8186f0388ad8205f2cd04726fdd (diff)
downloadpoky-e03c04758b5599e2ac7a3eb20954b81fcb4cf3d3.tar.gz
lib/oe/patch: fall back to patch if git apply fails
When PATCHTOOL = "git", git apply doesn't support fuzzy application, so if a patch requires that it's better to be able to apply it rather than just failing. (From OE-Core rev: a8143f33d3104adcd10968e3b05df2024e723f5a) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oe/patch.py')
-rw-r--r--meta/lib/oe/patch.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/meta/lib/oe/patch.py b/meta/lib/oe/patch.py
index b085c9d6b5..788f465bd9 100644
--- a/meta/lib/oe/patch.py
+++ b/meta/lib/oe/patch.py
@@ -219,7 +219,11 @@ class GitApplyTree(PatchTree):
219 return _applypatchhelper(shellcmd, patch, force, reverse, run) 219 return _applypatchhelper(shellcmd, patch, force, reverse, run)
220 except CmdError: 220 except CmdError:
221 shellcmd = ["git", "--git-dir=.", "apply", "-p%s" % patch['strippath']] 221 shellcmd = ["git", "--git-dir=.", "apply", "-p%s" % patch['strippath']]
222 return _applypatchhelper(shellcmd, patch, force, reverse, run) 222 try:
223 output = _applypatchhelper(shellcmd, patch, force, reverse, run)
224 except CmdError:
225 output = PatchTree._applypatch(self, patch, force, reverse, run)
226 return output
223 227
224 228
225class QuiltTree(PatchSet): 229class QuiltTree(PatchSet):