applying patches

This forum can be used to talk about general design strategies, new ideas and questions in general related to wxWidgets. If you feel your questions doesn't fit anywhere, put it here.
Post Reply
jab121
Earned a small fee
Earned a small fee
Posts: 17
Joined: Tue Jan 25, 2005 12:05 pm

applying patches

Post by jab121 »

Im trying to apply a patch to my MSW wxWindows distro.

I don't know how to apply patches using Windows, so Im doing it from Linux on the mounted Windows partition.
The command im using is:

patch -p0 < wxPrintingBackport.diff

from the wxWidgets/ directory. It finds all the files ok, but I get lots of error messages:

(Stripping trailing CRs from patch.)
patching file include/wx/prntbase.h
Hunk #6 FAILED at 212.
Hunk #8 FAILED at 260.
Hunk #9 FAILED at 270.
Hunk #11 FAILED at 283.
Hunk #13 FAILED at 329.
Hunk #14 FAILED at 332.
Hunk #15 FAILED at 335.
Hunk #16 FAILED at 338.
Hunk #17 FAILED at 372.
9 out of 19 hunks FAILED -- saving rejects to file include/wx/prntbase.h.rej

and so on. The patch is the correct version as far as I can see, so can anyone suggest what might be happening?

Thanks,
James
User avatar
Ryan Norton
wxWorld Domination!
wxWorld Domination!
Posts: 1319
Joined: Mon Aug 30, 2004 6:01 pm

Re: applying patches

Post by Ryan Norton »

jab121 wrote:Im trying to apply a patch to my MSW wxWindows distro.

I don't know how to apply patches using Windows, so Im doing it from Linux on the mounted Windows partition.
The command im using is:

patch -p0 < wxPrintingBackport.diff

from the wxWidgets/ directory. It finds all the files ok, but I get lots of error messages:

(Stripping trailing CRs from patch.)
patching file include/wx/prntbase.h
Hunk #6 FAILED at 212.
Hunk #8 FAILED at 260.
Hunk #9 FAILED at 270.
Hunk #11 FAILED at 283.
Hunk #13 FAILED at 329.
Hunk #14 FAILED at 332.
Hunk #15 FAILED at 335.
Hunk #16 FAILED at 338.
Hunk #17 FAILED at 372.
9 out of 19 hunks FAILED -- saving rejects to file include/wx/prntbase.h.rej

and so on. The patch is the correct version as far as I can see, so can anyone suggest what might be happening?

Thanks,
James
Well, you're really best off just doing the patch in windows - http://gnuwin32.sourceforge.net/packages/patch.htm. Its exactly the same as linux.

If you must do it from linux, you need to change the line endings of the patch file and the destination files to unix line endings, get flip http://ccrma-www.stanford.edu/~craig/utility/flip/ do

flip -u FILE

For the patchfile and the destination file
[Mostly retired moderator, still check in to clean up some stuff]
leio
Can't get richer than this
Can't get richer than this
Posts: 802
Joined: Mon Dec 27, 2004 10:46 am
Location: Estonia, Tallinn
Contact:

Re: applying patches

Post by leio »

jab121 wrote: (Stripping trailing CRs from patch.)
patching file include/wx/prntbase.h
Compilers: gcc-3.3.6, gcc-3.4.5, gcc-4.0.2, gcc-4.1.0 and MSVC6
OS's: Gentoo Linux, WinXP; WX: CVS HEAD

Project Manager of wxMUD - http://wxmud.sf.net/
Developer of wxGTK;
gtk+ port maintainer of OMGUI - http://www.omgui.org/
User avatar
Ryan Norton
wxWorld Domination!
wxWorld Domination!
Posts: 1319
Joined: Mon Aug 30, 2004 6:01 pm

Re: applying patches

Post by Ryan Norton »

leio wrote:
jab121 wrote: (Stripping trailing CRs from patch.)
patching file include/wx/prntbase.h
Yeah, it was a generalization - on windows the patch file has to be the same line endings, sometimes linux does this.

More I meant the destination files too...
[Mostly retired moderator, still check in to clean up some stuff]
jab121
Earned a small fee
Earned a small fee
Posts: 17
Joined: Tue Jan 25, 2005 12:05 pm

Post by jab121 »

Thats fantastic,

thanks,
J
Post Reply