How to apply patches?
Tue Aug 1 04:34:00 GMT 2000
"Thomas Heller" <firstname.lastname@example.org> writes:
> (Although I have created several patches in the past, I've
> never applied any myself)
I've created and applied patches without difficulty in the past.
However, these patches look impossible to apply using GNU patch 2.5 or
The problem is in determining the filename:
> |Index: snavigator/gui/Makefile.am
> |RCS file: /cvs/cvsfiles/devo/snavigator/gui/Makefile.am,v
> |retrieving revision 18.104.22.168.22.214.171.124
> |diff -c -2 -p -r126.96.36.199.188.8.131.52 Makefile.am
> |*** Makefile.am 2000/02/11 23:48:34 184.108.40.206.220.127.116.11
> |--- Makefile.am 2000/07/25 19:19:57
There are three relevant pathnames here: the old path, the new path,
and the Index: path. According to the manpage, patch will consider
them in that order.
If in POSIX mode, it'll take the first one that exists (in this case,
Makefile.am (the old pathname). Otherwise, it'll choose the best
pathname. Unfortunately, the best pathname seems to be the name with
fewest path name components, with the shortest basename.
Presumably somewhere there's a patch where you can tell it to use
Index, ignoring other pathnames. Indeed, that would seem to me to be
sane behaviour---if there's an Index line present, then surely whoever
generated the patch knew what they were doing.
Anyway, I don't know how to apply these patches. Do RedHat have some
special version of patch?
Bruce Stephens Bruce.Stephens@MessagingDirect.com
MessagingDirect(UK) Ltd <URL: http://www.MessagingDirect.com/ >
More information about the Sourcenav