aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2010-10-22 11:04:36 -0700
committerChris Larson <chris_larson@mentor.com>2010-11-08 07:59:23 -0700
commit9018df571adb705688c8ec975d1407af70e82cde (patch)
treed03865d64fed404d9535383256aa1c7422db1a4a
parent4e8c767f3fc281e26472e66ccde07419a2c092fc (diff)
downloadopenembedded-9018df571adb705688c8ec975d1407af70e82cde.zip
openembedded-9018df571adb705688c8ec975d1407af70e82cde.tar.gz
openembedded-9018df571adb705688c8ec975d1407af70e82cde.tar.bz2
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@mentor.com>
-rw-r--r--lib/oe/patch.py5
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)