Date: Tue, 20 Jan 1998 02:49:44 +0300 From: Dmitrij Tejblum <dima@tejblum.dnttm.rssi.ru> To: Андрей Чернов <ache@nagual.pp.ru> Cc: Dmitrij Tejblum <tejblum@arc.hq.cti.ru>, freebsd-ports@FreeBSD.ORG, committers@FreeBSD.ORG Subject: Re: amanda port, empty PATCH_STRIP= lines causes trouble Message-ID: <199801192349.CAA01277@tejblum.dnttm.rssi.ru> In-Reply-To: Your message of "Tue, 20 Jan 1998 00:42:44 %2B0300." <Pine.BSF.3.96.980120003928.21007A-100000@lsd.relcom.eu.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Андрей Чернов 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199801192349.CAA01277>