-   Linux - Newbie (
-   -   How to download Patches (

garbo73 12-20-2005 06:30 AM

How to download Patches
I am using FC4. When I try to go to a webpage to download a patch file, it just shows the code for the patch file. How do I save it as a .patch so that I can use the patch? Not sure if it's another program needed to make it work right so it downloads off of the page, or if it goes into a text editor and then I save it as a .patch file.

fouldsy 12-20-2005 06:43 AM

That's quite correct, a patch is just a text file containing the adjustments to be made to the code. What exactly is it you're trying to patch? Usually instructions for the patch should be available on the same site, but the usual method is changing into the directory where the patch should be applied (i.e. the same directory as the original source code) and then:

patch -p1 < name.patch

garbo73 12-20-2005 06:53 AM

I was playing around with LFS to learn more about how things work, part of the instructions is patching files you download. So are you saying that all I do is open the page with the new code and run the patch as directed above, I would think the code would need to be in the folder somewhere wouldn't it? If that's the case how do I get the file itself into the folder? Here is an example of a patch file they give, what do I do with it? :

All times are GMT -5. The time now is 08:14 PM.