Sender: rich AT phekda DOT freeserve DOT co DOT uk Message-ID: <39E06A7C.9BD27470@phekda.freeserve.co.uk> Date: Sun, 08 Oct 2000 13:37:16 +0100 From: Richard Dawe X-Mailer: Mozilla 4.51 [en] (X11; I; Linux 2.2.17 i586) X-Accept-Language: de,fr MIME-Version: 1.0 To: DJGPP workers Subject: Bizarre patch behaviour Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp-workers AT delorie DOT com Hello. While trying to generate a patch for the Fileutils port, I encountered some strange behaviour with [the DJGPP port of] patch 2.5, 2.5.3. I have modified the Fileutils sources & created a couple of files. If I create a diff using the command-line ('.' = location original Fileutils sources): 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! patch detects that the patch has already been applied to these files (unsurprising) and suggests reversing the patch, etc. Why does it apply all differences to files present in the original distribution OK and then change direction for the new files? Here's a solution: use relative paths for creating the patch (or do global search and replace afterwards, slightly dangerous). Patch seems to work then. Am I missing some expected patch behaviour here? I've read the info docs for patch, diffutils, but I can't see anything. Thanks, bye, -- Richard Dawe [ mailto:richdawe AT bigfoot DOT com | http://www.bigfoot.com/~richdawe/ ]