delorie.com/archives/browse.cgi | search |
Date: | Sun, 08 Oct 2000 17:37:59 +0200 |
From: | "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il> |
Sender: | halo1 AT zahav DOT net DOT il |
To: | rich AT phekda DOT freeserve DOT co DOT uk |
Message-Id: | <3028-Sun08Oct2000173759+0300-eliz@is.elta.co.il> |
X-Mailer: | Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.5h |
CC: | djgpp-workers AT delorie DOT com |
In-reply-to: | <39E06A7C.9BD27470@phekda.freeserve.co.uk> (message from Richard |
Dawe on Sun, 08 Oct 2000 13:37:16 +0100) | |
Subject: | Re: Bizarre patch behaviour |
References: | <39E06A7C DOT 9BD27470 AT phekda DOT freeserve DOT co DOT uk> |
Reply-To: | djgpp-workers AT delorie DOT com |
Errors-To: | nobody AT delorie DOT com |
X-Mailing-List: | djgpp-workers AT delorie DOT com |
X-Unsubscribes-To: | listserv AT delorie DOT com |
> Date: Sun, 08 Oct 2000 13:37:16 +0100 > From: Richard Dawe <rich AT phekda DOT freeserve DOT co DOT uk> > > diff -pPrC3 . /develop/ports/gnu.dev/filutil4.0 > [some-dir]/diffs > > and then try to apply the patch another fresh copy of the Fileutils > sources: > > patch -p0 -i [some-dir]/diffs > > then patch tries to patch the files in /develop/ports/gnu.dev/filutil4.0! Take a look at the section named "NOTES FOR PATCH SENDERS" in the Patch man page. You have violated one of the rules it sets: not to produce diffs where the OLD and the NEW files have different number of slashes. This is especially important if the patch is supposed to be applied with the -pN switch, as you did. It is usually best to have the old and the new files either in the same directory (and then obviously under different names/extensions, like *.c and *.bak), or in sibling directories that both have the same depth relative to some common parent. In the second case, run Diff from that common parent, to yield the same number of slashes in both OLD and NEW files. > Why does it apply > all differences to files present in the original distribution OK and then > change direction for the new files? Because Patch uses some complicated guesswork to find out which file to apply the patch to (it's not easy, contrary to how it sounds), and that guesswork sometimes breaks.
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |