[oe-commits] Chris Larson : oe.patch: for 'patch', always use -f
git version control
git at git.openembedded.org
Mon Nov 8 15:07:02 UTC 2010
Module: openembedded.git
Branch: master
Commit: 9018df571adb705688c8ec975d1407af70e82cde
URL: http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=9018df571adb705688c8ec975d1407af70e82cde
Author: Chris Larson <chris_larson at mentor.com>
Date: Fri Oct 22 11:04:36 2010 -0700
oe.patch: for 'patch', always use -f
Apparently quilt always ignores hunks that seem already applied, so let's do
the same via -f. -t would probably be better, but isn't safe to use from a
portability standpoint.
Signed-off-by: Chris Larson <chris_larson at mentor.com>
---
lib/oe/patch.py | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
diff --git a/lib/oe/patch.py b/lib/oe/patch.py
index 29d5102..4e709be 100644
--- a/lib/oe/patch.py
+++ b/lib/oe/patch.py
@@ -73,16 +73,13 @@ class PatchTree(PatchSet):
self.patches.insert(i, patch)
def _applypatch(self, patch, force = False, reverse = False, run = True):
- shellcmd = ["patch", "-p%s" % patch['strippath']]
+ shellcmd = ["patch", "-p%s" % patch['strippath'], "-f"]
if reverse:
shellcmd.append('-R')
if not run:
return subprocess.list2cmdline(shellcmd)
- if force:
- shellcmd.append('-f')
-
patch = open(patch['file'], "r")
return oe.process.run(shellcmd, cwd=self.dir, env=self.env, stdin=patch)
More information about the Openembedded-commits
mailing list