From owner-freebsd-ports Mon Jan 19 10:23:36 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id KAA01211 for freebsd-ports-outgoing; Mon, 19 Jan 1998 10:23:36 -0800 (PST) (envelope-from owner-freebsd-ports@FreeBSD.ORG) Received: from yandex.hq.cti.ru (yandex.hq.cti.ru [194.67.85.53]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id KAA00724; Mon, 19 Jan 1998 10:18:24 -0800 (PST) (envelope-from tejblum@arc.hq.cti.ru) Received: from localhost (tejblum@localhost) by yandex.hq.cti.ru (8.8.8/8.8.7) with ESMTP id VAA19195; Mon, 19 Jan 1998 21:01:53 +0300 (MSK) (envelope-from tejblum@arc.hq.cti.ru) Date: Mon, 19 Jan 1998 21:01:52 +0300 (MSK) From: Dmitrij Tejblum X-Sender: tejblum@yandex.hq.cti.ru Reply-To: Dmitrij Tejblum To: =?KOI8-R?B?4c7E0sXKIP7F0s7P1w==?= cc: freebsd-ports@FreeBSD.ORG, committers@FreeBSD.ORG, dima@tejblum.dnttm.rssi.ru Subject: Re: amanda port, empty PATCH_STRIP= lines causes trouble In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=koi8-r Content-Transfer-Encoding: 8BIT Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On 19 Jan 1998, Андрей Чернов wrote: > On Mon, 19 Jan 1998, Dmitrij Tejblum wrote: > > > [CC list trimmed] > > > > Андрей Чернов wrote: > > > I repeat (already many > > > times) that both new and old patch handle Index: equally. > > > > I don't believe it. From src/contrib/patch/NEWS: > > > > Changes in version 2.4: > > [...] > > * The method used to intuit names of files to be patched is changed again: > > `Index:' lines are normally ignored for context diffs, > > [...] > > Better check than spread rumors, don't be lazy and run some tests at > least. To be precise I mean "the stuff related to Index: lines" handled > equally in 2.1 and 2.5 patch versions. I mean _original_ GNU versions, > not modified in FreeBSD. I assume latest -stable version is already OK? Well, I sit now at -stable with especially updated patch, and run some test. I use standard CVS from 2.2 here, with broken cvs diff. See: Script started on Mon Jan 19 20:15:59 1998 tejblum@arc|/mnt/arc/usr/room/arcadia/ysite$ cvs diff -u yandex/index.cpp > index.ccp.diff tejblum@arc|/mnt/arc/usr/room/arcadia/ysite$ rm yandex/index.cpp tejblum@arc|/mnt/arc/usr/room/arcadia/ysite$ cvs upd yandex cvs update: Updating yandex M yandex/Makefile cvs update: warning: yandex/index.cpp was lost U yandex/index.cpp cvs update: Updating yandex/request tejblum@arc|/mnt/arc/usr/room/arcadia/ysite$ patch < index.cpp.diff Hmm... Looks like a unified diff to me... The text leading up to this was: -------------------------- |Index: yandex/index.cpp |=================================================================== |RCS file: /usr/room/arcadia/CVSROOT/arcadia/ysite/yandex/index.cpp,v |retrieving revision 1.39 |diff -u -r1.39 index.cpp |--- index.cpp 1997/12/05 19:47:05 1.39 |+++ index.cpp 1998/01/19 17:07:11 -------------------------- Patching file yandex/index.cpp using Plan A... Hunk #1 succeeded at 168. Hunk #2 succeeded at 193. Hunk #3 succeeded at 204. Hunk #4 succeeded at 229. Hunk #5 succeeded at 250. Hunk #6 succeeded at 261. Hunk #7 succeeded at 277. Hunk #8 succeeded at 335. Hunk #9 succeeded at 367. Hunk #10 succeeded at 446. Hunk #11 succeeded at 485. Hunk #12 succeeded at 1088. Hunk #13 succeeded at 1103. Hunk #14 succeeded at 1180. done tejblum@arc|/mnt/arc/usr/room/arcadia/ysite$ exit Script done on Mon Jan 19 20:17:02 1998 Note that there is no index.cpp in current directory, and patch was applied to the right file yandex/index.cpp. Indeed, in old patch context diff header (i.e. "***" and "---" lines) takes precedence over an Index: line. But new patch simple *ignore* Index: line, unless POSIXLY_CORRECT environment variable is set. Here is a test that "proves" it: tejblum@ywsearch|~$ patch -p0 < index.cpp.diff can't find file to patch at input line 8 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |Index: yandex/index.cpp |=================================================================== |RCS file: /usr/room/arcadia/CVSROOT/arcadia/ysite/yandex/index.cpp,v |retrieving revision 1.39 |diff -u -r1.39 index.cpp |--- index.cpp 1997/12/05 19:47:05 1.39 |+++ index.cpp 1998/01/19 17:07:11 -------------------------- File to patch: ^C tejblum@ywsearch|~$ POSIXLY_CORRECT=yes patch -p0 < index.cpp.diff patching file `yandex/index.cpp' tejblum@ywsearch|~$ I think, make patch more POSIX compliant in this case would be not so bad idea. Dima