From e03c04758b5599e2ac7a3eb20954b81fcb4cf3d3 Mon Sep 17 00:00:00 2001 From: Paul Eggleton Date: Fri, 19 Dec 2014 11:41:45 +0000 Subject: 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 Signed-off-by: Richard Purdie --- meta/lib/oe/patch.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'meta/lib/oe/patch.py') 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): return _applypatchhelper(shellcmd, patch, force, reverse, run) except CmdError: shellcmd = ["git", "--git-dir=.", "apply", "-p%s" % patch['strippath']] - return _applypatchhelper(shellcmd, patch, force, reverse, run) + try: + output = _applypatchhelper(shellcmd, patch, force, reverse, run) + except CmdError: + output = PatchTree._applypatch(self, patch, force, reverse, run) + return output class QuiltTree(PatchSet): -- cgit v1.2.3-54-g00ecf