[oe-commits] org.oe.dev patch.bbclass: fix issue encountered by zecke, where PatchTree was only doing a --dry-run, never actually applying the patch. Only quilt-native in oe was using that.
clarson commit
openembedded-commits at lists.openembedded.org
Tue Sep 5 11:37:02 UTC 2006
patch.bbclass: fix issue encountered by zecke, where PatchTree was only doing a --dry-run, never actually applying the patch. Only quilt-native in oe was using that.
Author: clarson at kergoth.com
Branch: org.openembedded.dev
Revision: 7e16c38efab413bbc5aae462f2ccd44bc020978e
ViewMTN: http://monotone.openembedded.org/revision.psp?id=7e16c38efab413bbc5aae462f2ccd44bc020978e
Files:
1
classes/patch.bbclass
Diffs:
#
# mt diff -rf5ac892354e565717a3484ae282835092bf581b3 -r7e16c38efab413bbc5aae462f2ccd44bc020978e
#
#
#
# patch "classes/patch.bbclass"
# from [3ab348fb313a3f01a472ac9ddae2df5e556dc394]
# to [2382aef08c4d26415d3a3a8237dd9829449a387c]
#
============================================================
--- classes/patch.bbclass 3ab348fb313a3f01a472ac9ddae2df5e556dc394
+++ classes/patch.bbclass 2382aef08c4d26415d3a3a8237dd9829449a387c
@@ -120,21 +120,20 @@ def patch_init(d):
self.patches.insert(self._current or 0, patch)
def _applypatch(self, patch, force = None, reverse = None):
- shellcmd = ["patch", "<", patch['file'], "-p", patch['strippath']]
+ shellcmd = ["cat", patch['file'], "|", "patch", "-p", patch['strippath']]
if reverse:
shellcmd.append('-R')
- shellcmd.append('--dry-run')
- try:
- output = runcmd(["sh", "-c", " ".join(shellcmd)], self.dir)
- except CmdError:
- if force:
- shellcmd.pop(len(shellcmd) - 1)
- output = runcmd(["sh", "-c", " ".join(shellcmd)], self.dir)
- else:
- import sys
- raise sys.exc_value
+ if not force:
+ shellcmd.append('--dry-run')
+ output = runcmd(["sh", "-c", " ".join(shellcmd)], self.dir)
+
+ if force:
+ return
+
+ shellcmd.pop(len(shellcmd) - 1)
+ output = runcmd(["sh", "-c", " ".join(shellcmd)], self.dir)
return output
def Push(self, force = None, all = None):
More information about the Openembedded-commits
mailing list