diff options
Diffstat (limited to 'meta/lib/oe/patch.py')
-rw-r--r-- | meta/lib/oe/patch.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/meta/lib/oe/patch.py b/meta/lib/oe/patch.py index 108bf1de56..7441214006 100644 --- a/meta/lib/oe/patch.py +++ b/meta/lib/oe/patch.py | |||
@@ -407,6 +407,13 @@ class GitApplyTree(PatchTree): | |||
407 | runcmd(["sh", "-c", " ".join(shellcmd)], self.dir) | 407 | runcmd(["sh", "-c", " ".join(shellcmd)], self.dir) |
408 | except CmdError: | 408 | except CmdError: |
409 | pass | 409 | pass |
410 | # git am won't always clean up after itself, sadly, so... | ||
411 | shellcmd = ["git", "--work-tree=%s" % reporoot, "reset", "--hard", "HEAD"] | ||
412 | runcmd(["sh", "-c", " ".join(shellcmd)], self.dir) | ||
413 | # Also need to take care of any stray untracked files | ||
414 | shellcmd = ["git", "--work-tree=%s" % reporoot, "clean", "-f"] | ||
415 | runcmd(["sh", "-c", " ".join(shellcmd)], self.dir) | ||
416 | |||
410 | # Fall back to git apply | 417 | # Fall back to git apply |
411 | shellcmd = ["git", "--git-dir=%s" % reporoot, "apply", "-p%s" % patch['strippath']] | 418 | shellcmd = ["git", "--git-dir=%s" % reporoot, "apply", "-p%s" % patch['strippath']] |
412 | try: | 419 | try: |