From owner-freebsd-bugs Thu Apr 3 02:07:12 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id CAA11071 for bugs-outgoing; Thu, 3 Apr 1997 02:07:12 -0800 (PST) Received: from mexico.brainstorm.eu.org (mexico.brainstorm.fr [193.56.58.253]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id CAA11062 for ; Thu, 3 Apr 1997 02:07:06 -0800 (PST) Received: from brasil.brainstorm.eu.org (brasil.brainstorm.fr [193.56.58.33]) by mexico.brainstorm.eu.org (8.8.4/8.8.4) with ESMTP id MAA29384 for ; Thu, 3 Apr 1997 12:07:00 +0200 Received: (from uucp@localhost) by brasil.brainstorm.eu.org (8.8.4/8.6.12) with UUCP id MAA02498 for freebsd-bugs@freefall.freebsd.org; Thu, 3 Apr 1997 12:06:44 +0200 Received: (from roberto@localhost) by keltia.freenix.fr (8.8.5/keltia-uucp-2.9) id MAA20961; Thu, 3 Apr 1997 12:04:58 +0200 (CEST) Message-ID: <19970403120458.33651@keltia.freenix.fr> Date: Thu, 3 Apr 1997 12:04:58 +0200 From: Ollivier Robert To: freebsd-bugs@freefall.freebsd.org Subject: Re: gnu/3176: `patch' creates files in wrong places (following Index) References: <199704022200.OAA27937@freefall.freebsd.org> <19970403015947.46958@keltia.freenix.fr> <19970403075144.ZT46473@uriah.heep.sax.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.67 In-Reply-To: <19970403075144.ZT46473@uriah.heep.sax.de>; from J Wunsch on Thu, Apr 03, 1997 at 07:51:44AM +0200 X-Operating-System: FreeBSD 3.0-CURRENT ctm#3153 Sender: owner-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk According to J Wunsch: > > Why does our patch(1) apply the -p1 only for *new* files ? There is an > > inconsistency in that. > > It doesn't apply -p1 only to new files. Our patch succeeds in patching existing files (i.e. it respects Index: without applying -p1 to the file name) but fails in creating new files. If you're in the directory base/ (important) and the diff contains Index dir/foo/bar --- base/dir/foo/bar.orig +++ base/dir/foo/bar It will succeed in patching dir/foo/bar. *Now*, if you have Index foo/bar --- /dev/null +++ base/dir/foo/bar it will create foo/bar in the current directory, not in dir/foo/ ! I got this every time I tried to patch dev. versions of Perl with our patch(1). It works as expected with GNU patch(1). > This would surprise me mucho. If you can show an inconsistency > between new and existing files, go ahead. As the PR stands, it only > proved that Index: lines get precedence over other file names, and > _this_ is a feature. I know that and I agree. But the Index: treatment with respect to -p1 is still a bug. - take Perl5.003_90.tar.gz, - extract it, - cd perl5.003_90, - get perl5.003_91.pat.gz, - do zcat perl5.003_91.pat.gz | sh, - do zcat perl5.003_91.pat.gz | /usr/bin/patch -p1 -N (as recommended in .pat). - ./Configure and watch it telling you that you're missing some files... -- Ollivier ROBERT -=- FreeBSD: There are no limits -=- roberto@keltia.freenix.fr FreeBSD keltia.freenix.fr 3.0-CURRENT #41: Sun Mar 23 23:01:22 CET 1997