From owner-freebsd-standards Sat Feb 9 11:46:50 2002 Delivered-To: freebsd-standards@freebsd.org Received: from chiark.greenend.org.uk (chiark.greenend.org.uk [212.22.195.2]) by hub.freebsd.org (Postfix) with ESMTP id 79B6F37B419 for ; Sat, 9 Feb 2002 11:46:45 -0800 (PST) Received: from fanf by chiark.greenend.org.uk with local (Exim 3.12 #2) id 16ZdS9-0003qo-00 (Debian); Sat, 09 Feb 2002 19:46:29 +0000 Date: Sat, 9 Feb 2002 19:46:29 +0000 From: Tony Finch To: fyre@orbital.wiretapped.net Cc: "M. Warner Losh" , freebsd-standards@FreeBSD.ORG Subject: Re: diff problem Message-ID: <20020209194629.A11392@chiark.greenend.org.uk> References: <20020209140259.A51448@descent.robbins.dropbear.id.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii User-Agent: Mutt/1.0.1i In-Reply-To: <20020209140259.A51448@descent.robbins.dropbear.id.au>; from tim@robbins.dropbear.id.au on Sat, Feb 09, 2002 at 02:02:59PM +1100 Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sat, Feb 09, 2002 at 02:02:59PM +1100, Tim Robbins wrote: > > I have absolutely no idea why we have both version 2.5 and version 2.1 of > patch in the tree. 2.5 lives in /usr/src/contrib/patch, 2.1 lives in > /usr/src/gnu/usr.bin/patch. Version 2.1 ends up in /usr/bin, version 2.5 > is not installed anywhere I can find. The reason for this is that versions of `patch` after 2.1 do not correctly handle the output of `cvs diff`. For example, on FreeBSD-4.5-STABLE, first using `patch` 2.5 then using `patch` 2.1: fanf@hand.dotat.at:/FreeBSD/releng4/bin/sh : 0; cvs diff > patch cvs diff: Diffing . cvs diff: Diffing bltin cvs diff: Diffing funcs fanf@hand.dotat.at:/FreeBSD/releng4/bin/sh : 1; cat patch Index: bltin/echo.c =================================================================== RCS file: /home/ncvs/src/bin/sh/bltin/echo.c,v retrieving revision 1.9.2.1 diff -u -r1.9.2.1 echo.c --- bltin/echo.c 29 Jun 2000 20:51:59 -0000 1.9.2.1 +++ bltin/echo.c 9 Feb 2002 19:41:00 -0000 @@ -37,6 +37,8 @@ * $FreeBSD: src/bin/sh/bltin/echo.c,v 1.9.2.1 2000/06/29 20:51:59 mph Exp $ */ +/* example change */ + /* * Echo command. */ fanf@hand.dotat.at:/FreeBSD/releng4/bin/sh : 0; rm -r bltin fanf@hand.dotat.at:/FreeBSD/releng4/bin/sh : 0; cvs up cvs update: Updating . ? patch ? tmp cvs update: Updating bltin U bltin/bltin.h U bltin/echo.1 U bltin/echo.c cvs update: Updating funcs fanf@hand.dotat.at:/FreeBSD/releng4/bin/sh : 0; /FreeBSD/releng4/contrib/patch/patch < patch can't find file to patch at input line 8 Perhaps you should have used the -p or --strip option? The text leading up to this was: -------------------------- |Index: bltin/echo.c |=================================================================== |RCS file: /home/ncvs/src/bin/sh/bltin/echo.c,v |retrieving revision 1.9.2.1 |diff -u -r1.9.2.1 echo.c |--- bltin/echo.c 29 Jun 2000 20:51:59 -0000 1.9.2.1 |+++ bltin/echo.c 9 Feb 2002 19:41:00 -0000 -------------------------- File to patch: ^C fanf@hand.dotat.at:/FreeBSD/releng4/bin/sh : 130; patch < patch Hmm... Looks like a unified diff to me... The text leading up to this was: -------------------------- |Index: bltin/echo.c |=================================================================== |RCS file: /home/ncvs/src/bin/sh/bltin/echo.c,v |retrieving revision 1.9.2.1 |diff -u -r1.9.2.1 echo.c |--- bltin/echo.c 29 Jun 2000 20:51:59 -0000 1.9.2.1 |+++ bltin/echo.c 9 Feb 2002 19:41:00 -0000 -------------------------- Patching file bltin/echo.c using Plan A... Hunk #1 succeeded at 37. done fanf@hand.dotat.at:/FreeBSD/releng4/bin/sh : 0; Tony. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message