[oe-commits] Paul Eggleton : lib/oe/patch: fall back to patch if git apply fails
git at git.openembedded.org
git at git.openembedded.org
Sat Dec 20 11:24:52 UTC 2014
Module: openembedded-core.git
Branch: master-next
Commit: 13082eb29179ca93ebf5c1b30691816225f28a7e
URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=13082eb29179ca93ebf5c1b30691816225f28a7e
Author: Paul Eggleton <paul.eggleton at linux.intel.com>
Date: Fri Dec 19 11:41:45 2014 +0000
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.
Signed-off-by: Paul Eggleton <paul.eggleton at linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/lib/oe/patch.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/meta/lib/oe/patch.py b/meta/lib/oe/patch.py
index b085c9d..788f465 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):
More information about the Openembedded-commits
mailing list