Path: utzoo!mnetor!uunet!husc6!rutgers!ames!ucbcad!ucbvax!shark.gwd.tek.COM!paulsh From: paulsh@shark.gwd.tek.COM Newsgroups: comp.windows.x Subject: Caution, study first hunk when applying patches to X11 files. Message-ID: <8712202350.AA06757@shark.GWD.TEK.COM> Date: 20 Dec 87 23:50:27 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The ARPA Internet Lines: 38 This CAUTION is intended for those who are applying patches to X11 files. If you have checked in the original files as the "initial version" on your local host, then your RCS strings like $HEADER$ are different from those being patched at MIT. This is also the case if you have made any local modifications of a file. This usually causes the first hunk to fail. Checking the .rej will show what hunks failed and what was different between the MIT original file and the MIT patched file. If it is only RCS stings that are affected, then you can ignore the failed hunk. Again in this scenario the first hunk may fail, but it is usually due only to RCS stings and can be ignored. However sometimes the first hunk contains RCS stings AND other changes that need to be incorporated. Therefore I caution implementors from getting into the habit of ignoring a failed first hunk. ***** ALWAYS check the .rej after patching to be sure ***** ***** that any failed hunks are due only to RCS stings! ***** In the last set of fixes, fix 82 and 86 have first hunks that include additional changes besides the changed RCS strings. Therefore in the scenario above, to apply the fix you can modify the patch to delete the RCS string changes but keep the other changes that need to be incorporated. To summarize, Don't blindly ignore a failed first hunk! Hope this helps. Paul Shearer M.S. 61-277 Tektronix, Inc. P.O. Box 1000 Wilsonville, OR 97070-1000 W (503) 685-2137 tektronix!shark!paulsh