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>
This commit is contained in:
parent
37db9e62f0
commit
50e771d114
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue