news@cvbnet2.UUCP (news) (09/16/88)
Reply To: pcolby@robbie.prime.com While trying to update perl 2.0 I ran into the following problem with patch. (note that perl 2.0 has several subdirectories: x2p, t, lib, eg, ...) Any time the Index or the filenames called for a file in one of the subdirectories, Patch would ask me "File to patch:" OK so far, BUT in the case of Makefile.SH and x2p/Makefile.SH (ie, a different Makefile.SH in the main directory and a subdirectory), patch attempted to patch the original Makefile.SH when the x2p/Makefile.SH was called for. Of course, the patch would fail and the rejects would end up in Makefile.SH.rej. This first happened with patch#4, I didn't notice it until I had applied patch#8 (the failure messages go by so fast I didn't register them) and at the time I couldn't figure out the problem. Since Makefile.SH looked ok, I just deleted the .rej file and went merrily on. (Bad practice you say? I agree but since I had 14 patches to install to perl + patches to install to rn + real work to do, ...). Suffice it to say, I ran into the same problem with patch#14. I didn't figure out the real problem until I had restored the original Makefile.SH that came with the source posting and tried to reapply only those portions of the patches that touched Makefile.SH or x2p/Makefile.SH. The result of all this is to ask if this is a bug or a feature in patch. I would think that there ought to be some way of informing patch about subdirectories without having to '+ -d' your way to glory for a large diff. Peter Colby PS: I suppose that I can volunteer to attempt to fix the problem but it will take some time for me to understand the implications of any solution I come up with. Larry??? UUCP: {decvax,linus,sun}!cvbnet!pcolby UUCP: pcolby@robbie.prime.com CSNET: pcolby@robbie.prime.com
lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) (09/17/88)
In article <200@cvbnet2.UUCP> news@cvbnet2.UUCP (news) writes:
: Any time the Index or the filenames called for a file in one of the
: subdirectories, Patch would ask me "File to patch:"
: ...
: The result of all this is to ask if this is a bug or a feature in patch. I
: would think that there ought to be some way of informing patch about
: subdirectories without having to '+ -d' your way to glory for a large diff.
Which is why the patch says to say "patch -p -N". Someday I may make that
default.
Larry
allbery@ncoast.UUCP (Brandon S. Allbery) (09/24/88)
As quoted from <200@cvbnet2.UUCP> by news@cvbnet2.UUCP (news): +--------------- | While trying to update perl 2.0 I ran into the following problem with patch. | (note that perl 2.0 has several subdirectories: x2p, t, lib, eg, ...) | | Any time the Index or the filenames called for a file in one of the | subdirectories, Patch would ask me "File to patch:" | OK so far, BUT in the case of Makefile.SH and x2p/Makefile.SH (ie, a different | Makefile.SH in the main directory and a subdirectory), patch attempted to | patch the original Makefile.SH when the x2p/Makefile.SH was called for. Of | course, the patch would fail and the rejects would end up in Makefile.SH.rej. +--------------- If you had read either (1) the patches or (2) the manual for patch, you would have discovered the "-p" option to patch. "When all else fails, read the manual" is a bad philosophy. At least read the manual BEFORE posting to the net. ++Brandon -- Brandon S. Allbery, uunet!marque!ncoast!allbery DELPHI: ALLBERY For comp.sources.misc send mail to ncoast!sources-misc "Don't discount flying pigs before you have good air defense." -- jvh@clinet.FI