From owner-freebsd-ports Mon Jan 19 16:19:14 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id QAA08372 for freebsd-ports-outgoing; Mon, 19 Jan 1998 16:19:14 -0800 (PST) (envelope-from owner-freebsd-ports@FreeBSD.ORG) Received: from helios.dnttm.ru (root@dnttm.wave.ras.ru [194.85.104.197]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id QAA08172; Mon, 19 Jan 1998 16:17:42 -0800 (PST) (envelope-from dima@tejblum.dnttm.rssi.ru) Received: (from uucp@localhost) by helios.dnttm.ru (8.8.5/8.8.5/IP-3) with UUCP id CAA00137; Tue, 20 Jan 1998 02:46:39 +0300 Received: from tejblum.dnttm.rssi.ru (localhost [127.0.0.1]) by tejblum.dnttm.rssi.ru (8.8.8/8.8.7) with ESMTP id CAA01277; Tue, 20 Jan 1998 02:49:45 +0300 (MSK) (envelope-from dima@tejblum.dnttm.rssi.ru) Message-Id: <199801192349.CAA01277@tejblum.dnttm.rssi.ru> X-Mailer: exmh version 2.0gamma 1/27/96 To: Андрей Чернов cc: Dmitrij Tejblum , freebsd-ports@FreeBSD.ORG, committers@FreeBSD.ORG Subject: Re: amanda port, empty PATCH_STRIP= lines causes trouble In-reply-to: Your message of "Tue, 20 Jan 1998 00:42:44 +0300." Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 8bit Date: Tue, 20 Jan 1998 02:49:44 +0300 From: Dmitrij Tejblum Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Андрей Чернов wrote: > > Nope. I just posted example of old behavior. Old patch looked at ***/--- > > lines, could not find file to patch, and *after it* looked at Index: line, > > and could find this file. New patch ignore Index: even after it couldn't find > > file in ***/--- lines. This is the difference. > > We talk about CVS generated diffs for ports system here, old name assumed > to exist. What is the difference between a patch for ports system and patch that can be applied? I don't see any. I will try again, step by step. Consider the example I already posted: 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 This is a real example of CVS generated diff, until you fixed CVS. File index.cpp doesn't exists in the current directory, but it *exists* in the 'yandex' directory. So, old patch looks to ---/+++ lines (it is unified diff, but it doesn't matter), cannot find the file index.cpp in current directory, then looks at Index: line, and can find this file under the 'yandex' directory, and patch the file yandex/index.cpp, which, again, exists. This is called *precedence*: first it looks to ***/---/+++ lines, if it fail, it looks at Index: line. New patch *ignore* the Index: line (unless POSIXLY_CORRECT environment variable is set), even when it cannot found the file mentioned in ***/---/+++. So it cannot find file to patch. So, please don't say that old GNU patch always ignored Index: line, and there is no difference. It is simple don't true. I have already tried, as you requested. You can try too. Don't be lazy! Also please note that new patch looks at Index: line if POSIXLY_CORRECT environment variable set. So, not all "evil" in new patch is result of POSIX compliance. Dima