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. |
cat -cd patchname | patch -d directory -p1
|
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.
|
untar the package first.
|
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 -------------------------- |
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. |
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.
|
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. |