LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Applying patches in linux (https://www.linuxquestions.org/questions/linux-newbie-8/applying-patches-in-linux-217477/)

corbis_demon 08-14-2004 07:36 AM

Applying patches in linux
 
Hi,
I recently downloaded a package along with a patch.I can't compile it without the patch.Can someone tell me how do I go about it?The patch I have is not compressed.How do I apply the patch?Please help.

whansard 08-14-2004 07:51 AM

cat -cd patchname | patch -d directory -p1

corbis_demon 08-14-2004 08:07 AM

Sorry for the bother,but I have the rep-gtk tarball and it's gtk-2.4 patch in text form.According to the reply,do I untar the rep-gtk package and apply the patch with the command you posted or do I need to do something else.Please help.

whansard 08-14-2004 08:14 AM

untar the package first.

corbis_demon 08-14-2004 10:30 AM

Hi,
I did as wa required,but the compiler throws up this error.What am I missing?

Code:

[root@localhost rep-gtk-0.18]# patch -p1 < rep-gtk-0.18-gtk2.4.diff  (Stripping trailing CRs from patch.)  can't find file to patch at input line 3  Perhaps you used the wrong -p or --strip option?  The text leading up to this was:  --------------------------  |--- rep-gtk-0.18/rep-gtk.h.orig2004-03-26 14:10:18.000000000 -0500  |+++ rep-gtk-0.18/rep-gtk.h2004-03-26 14:11:15.000000000 -0500  --------------------------
I copied the patch file to the extracted rep-gtk directory and executed the commands it.I think the files to be patched are the rep-gtk header file and the gtk-compatibility header file.Is there some way I can get over this problem? Please help.

whansard 08-14-2004 11:01 PM

you give the pathname of the directory to be patched to patch. the patch doesn't need to be in the directory with the files.
cat -cd /rep-gtk-0.18-gtk2.4.diff | patch -d /rep-gtk-0.18 -p1
if both are in the root directory.

corbis_demon 08-15-2004 09:16 AM

I tried everything.It just doesn't work.The patch is from a very good source,so no chance of it being corrupt.The download was clean too.Has anyone done this before?Please help.

whansard 08-15-2004 09:40 AM

sorry i gave you the wrong command.
the -cd is for gzip, not for cat. besure to get the full pathname for the patch and directory.

cat /rep-gtk-0.18-gtk2.4.diff | patch -d /rep-gtk-0.18 -p1


All times are GMT -5. The time now is 06:16 PM.