Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Jan 1998 04:27:55 +0300
From:      Dmitrij Tejblum <dima@tejblum.dnttm.rssi.ru>
To:        ports@FreeBSD.ORG
Subject:   patch - a summary (was Re: amanda port, ...) 
Message-ID:  <199801210127.EAA02917@tejblum.dnttm.rssi.ru>
In-Reply-To: Your message of "Tue, 20 Jan 1998 09:41:44 MST." <199801201641.JAA10995@harmony.village.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
People, sorry for disturbing you in this thread. I plan to stop it. But now 
here is a short ;-( summary about patch(1) behavior.

0. We talk about 3 versions of patch:
	- GNU patch 2.1, same as patch from 2.2-stable
	- GNU patch 2.5, the version in 3.0-current.
	- patch from FreeBSD 2.1.5R ... 2.2.5R
1.1. Ache sayed several times that GNU patch 2.1 and GNU patch 2.5 "handle Index: 
lines equally". (I am not sure if he thinks so now (***)). It is not true:
	- Difference documented in src/contrib/patch/NEWS, an official GNU 
	documentation.
	- Everyone can read manpages and run tests. I already posted some 
	examples.
1.2. A practical difference between these versions of patch:
	- GNU patch 2.1 can correctly apply *most* (but not all) CVS patches.
	- GNU patch 2.5 *very rare* can correctly apply CVS patches (unless it 
		is in POSIXLY_CORRECT mode) (*)
	- patch from FreeBSD 2.1.5R ... 2.2.5R can always apply CVS patches.
Here assumed that patch doesn't supposed to create files (I haven't checked this case), 
and that CVS is "old", not fixed by ache.

2. Impact for the ports collection:
2.1. patch in 2.2-stable (aka GNU patch 2.1) can correctly apply *all* FreeBSD 
	patches in the ports collection as of yesterday. (This mean that latest 
	ache's patch changes in 2.2 didn't broke anythink in the ports collection)
2.2. patch in 3.0-current cannot apply some patches by default, but can apply 
	all patches in POSIXLY_CORRECT mode. (**)
Again, it is about real patches in the port collection, not about common case. 
This is not actually tested, but I am pretty sure about it. 

(*) This is probably only useful part of this posting, so I repeat it again: if you 
cannot apply a patch under -current, try set POSIXLY_CORRECT variable in your 
environment.

(**) That said, I don't think that fixing some patches is a bad idea. BTW, 
probably simplest way to fix such patches is *remove* ***/---/+++ lines.

(***) May be, he mean "equally in worst case"? Not sure that it can mean...

Dima





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199801210127.EAA02917>