[oe-commits] Chris Larson : oe.patch: don't use dry-run for 'patch'

git version control git at git.openembedded.org
Fri Oct 22 03:31:00 UTC 2010


Module: openembedded.git
Branch: kergoth/autotools
Commit: 44887999faab4d885a7280d7e686a89a1720c4e6
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=44887999faab4d885a7280d7e686a89a1720c4e6

Author: Chris Larson <chris_larson at mentor.com>
Date:   Thu Oct 21 18:46:27 2010 -0700

oe.patch: don't use dry-run for 'patch'

There are patches which 'patch' thinks it can't apply, but which do apply, so
stop using dry-run.  In addition, --dry-run isn't compatible with all versions
of patch.

Signed-off-by: Chris Larson <chris_larson at mentor.com>

---

 lib/oe/patch.py |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/lib/oe/patch.py b/lib/oe/patch.py
index ea5309f..d153a0c 100644
--- a/lib/oe/patch.py
+++ b/lib/oe/patch.py
@@ -80,11 +80,10 @@ class PatchTree(PatchSet):
         if not run:
             return subprocess.list2cmdline(shellcmd)
 
-        patch = open(patch['file'], "r")
-        if not force:
-            oe.process.run(shellcmd + ["--dry-run"], cwd=self.dir, stdin=patch)
-            patch.seek(0)
+        if force:
+            shellcmd.append('-f')
 
+        patch = open(patch['file'], "r")
         return oe.process.run(shellcmd, cwd=self.dir, env=self.env, stdin=patch)
 
     def Push(self, force = False, all = False, run = True):





More information about the Openembedded-commits mailing list