diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2014-12-19 11:41:48 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-12-21 12:37:18 +0000 |
commit | 630a393d01950a0d00b5d30ac376472911e50ff9 (patch) | |
tree | 86d837607f9bf0ad19ecfa09aea9a008d3a1f32a /meta | |
parent | 1cfcae0cd0bc776f5bb91a75bb8ffdad3d7bf200 (diff) | |
download | openembedded-core-630a393d01950a0d00b5d30ac376472911e50ff9.tar.gz openembedded-core-630a393d01950a0d00b5d30ac376472911e50ff9.tar.bz2 openembedded-core-630a393d01950a0d00b5d30ac376472911e50ff9.zip |
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@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/lib/oe/patch.py | 6 |
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): 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: |