]> code.ossystems Code Review - openembedded-core.git/commitdiff
meta/lib/oe/patch.py: do not leave .orig files if a patch isn't perfectly matching
authorAlexander Kanavin <alexander.kanavin@linux.intel.com>
Fri, 9 Mar 2018 12:27:46 +0000 (14:27 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 11 Mar 2018 13:25:19 +0000 (06:25 -0700)
Particularly, this was causing 'devtool modify' to erroneously add those
.orig files into commits. This was getting in the way, if the goal
was to amend/update those existing patches.

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/lib/oe/patch.py

index 584bf6c05fb209f084bc436c6d3e5f15c04d32f4..f02dee8d27d1cc416de7ea518897991ec764132a 100644 (file)
@@ -212,7 +212,7 @@ class PatchTree(PatchSet):
         self.patches.insert(i, patch)
 
     def _applypatch(self, patch, force = False, reverse = False, run = True):
-        shellcmd = ["cat", patch['file'], "|", "patch", "-p", patch['strippath']]
+        shellcmd = ["cat", patch['file'], "|", "patch", "--no-backup-if-mismatch", "-p", patch['strippath']]
         if reverse:
             shellcmd.append('-R')