[oe-commits] Paul Eggleton : lib/oe/patch.py: abort "git am" if it 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: 3204177346d1f3b29615d0f05435acbebab8c6f4
URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=3204177346d1f3b29615d0f05435acbebab8c6f4
Author: Paul Eggleton <paul.eggleton at linux.intel.com>
Date: Fri Dec 19 11:41:48 2014 +0000
lib/oe/patch.py: abort "git am" if it fails
If we don't do this, you may still be in the git am resolution mode at
the end of applying patches, which is not desirable.
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, 6 insertions(+)
diff --git a/meta/lib/oe/patch.py b/meta/lib/oe/patch.py
index 2bf3065..5227781 100644
--- a/meta/lib/oe/patch.py
+++ b/meta/lib/oe/patch.py
@@ -290,6 +290,12 @@ class GitApplyTree(PatchTree):
shellcmd = ["git", "--work-tree=.", "am", "-3", "--keep-cr", "-p%s" % patch['strippath']]
return _applypatchhelper(shellcmd, patch, force, reverse, run)
except CmdError:
+ # Need to abort the git am, or we'll still be within it at the end
+ try:
+ shellcmd = ["git", "--work-tree=.", "am", "--abort"]
+ runcmd(["sh", "-c", " ".join(shellcmd)], self.dir)
+ except CmdError:
+ pass
# Fall back to git apply
shellcmd = ["git", "--git-dir=.", "apply", "-p%s" % patch['strippath']]
try:
More information about the Openembedded-commits
mailing list