summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2014-12-19 11:41:48 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-12-21 12:37:56 +0000
commit50e771d1140276b8f5d472237e4cb41cf512e5df (patch)
tree6df6bfb375b8b513ccb76eb284a2f413956f2134 /meta/lib/oe
parent37db9e62f06087a8ad46ab5babce3037d18edbfb (diff)
downloadpoky-50e771d1140276b8f5d472237e4cb41cf512e5df.tar.gz
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. (From OE-Core rev: 630a393d01950a0d00b5d30ac376472911e50ff9) 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')
-rw-r--r--meta/lib/oe/patch.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/meta/lib/oe/patch.py b/meta/lib/oe/patch.py
index 2bf30651eb..522778140c 100644
--- a/meta/lib/oe/patch.py
+++ b/meta/lib/oe/patch.py
@@ -290,6 +290,12 @@ class GitApplyTree(PatchTree):
290 shellcmd = ["git", "--work-tree=.", "am", "-3", "--keep-cr", "-p%s" % patch['strippath']] 290 shellcmd = ["git", "--work-tree=.", "am", "-3", "--keep-cr", "-p%s" % patch['strippath']]
291 return _applypatchhelper(shellcmd, patch, force, reverse, run) 291 return _applypatchhelper(shellcmd, patch, force, reverse, run)
292 except CmdError: 292 except CmdError:
293 # Need to abort the git am, or we'll still be within it at the end
294 try:
295 shellcmd = ["git", "--work-tree=.", "am", "--abort"]
296 runcmd(["sh", "-c", " ".join(shellcmd)], self.dir)
297 except CmdError:
298 pass
293 # Fall back to git apply 299 # Fall back to git apply
294 shellcmd = ["git", "--git-dir=.", "apply", "-p%s" % patch['strippath']] 300 shellcmd = ["git", "--git-dir=.", "apply", "-p%s" % patch['strippath']]
295 try: 301 try: