From owner-freebsd-bugs Wed Apr 2 13:00:08 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id NAA23983 for bugs-outgoing; Wed, 2 Apr 1997 13:00:08 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id NAA23945; Wed, 2 Apr 1997 13:00:02 -0800 (PST) Resent-Date: Wed, 2 Apr 1997 13:00:02 -0800 (PST) Resent-Message-Id: <199704022100.NAA23945@freefall.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-bugs Resent-Reply-To: FreeBSD-gnats@freefall.FreeBSD.org, charnier@xp11.frmug.org Received: from frmug.org (frmug-gw.frmug.org [193.56.58.252]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id MAA23881 for ; Wed, 2 Apr 1997 12:59:23 -0800 (PST) Received: (from uucp@localhost) by frmug.org (8.8.5/8.8.5/frmug-2.0) with UUCP id WAA27333 for FreeBSD-gnats-submit@freebsd.org; Wed, 2 Apr 1997 22:59:12 +0200 (MET DST) Received: (from charnier@localhost) by xp11.frmug.org (8.8.5/8.8.5/xp11-uucp-1.1) id WAA05260; Wed, 2 Apr 1997 22:52:57 +0200 (CEST) Message-Id: <199704022052.WAA05260@xp11.frmug.org> Date: Wed, 2 Apr 1997 22:52:57 +0200 (CEST) From: Philippe Charnier Reply-To: charnier@xp11.frmug.org To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: gnu/3176: `patch' creates files in wrong places (following Index) Sender: owner-bugs@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >Number: 3176 >Category: gnu >Synopsis: `patch' creates files in wrong places >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-bugs >State: open >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Apr 2 13:00:01 PST 1997 >Last-Modified: >Originator: Philippe Charnier >Organization: >Release: FreeBSD 3.0-CURRENT i386 >Environment: >Description: >How-To-Repeat: mkdir -p a-1.0/b then create the patch file (called file.patch): Index: b/file --- /dev/null Wed Apr 2 20:33:10 1997 +++ a-2.0/b/file Wed Apr 2 21:58:35 1997 @@ -0,0 +1 @@ +version 2 cd a-1.0 patch -p1 -N < ../file.patch Hmm... Looks like a unified diff to me... The text leading up to this was: -------------------------- |Index: b/file |--- /dev/null Wed Apr 2 20:33:10 1997 |+++ a-2.0/b/file Wed Apr 2 21:58:35 1997 -------------------------- (Creating file file...) <------------- should be b/file Patching file file using Plan A... Hunk #1 succeeded at 1. done >Fix: If the line `Index: b/file' is not provided, the command works as expected. If not, the -p1 option is applied against Index. Maybe something like that: in pch.c - indname = fetchname(indtmp, strippath, ok_to_create_file); + indname = fetchname(indtmp, 957, ok_to_create_file); - bestguess = fetchname(indtmp, strippath, TRUE); + bestguess = fetchname(indtmp, 957, TRUE); Obtained when trying to patch perl (-p1 -N): Index: lib/ExtUtils/Command.pm *** /dev/null Fri Mar 21 23:14:07 1997 --- perl5.003_94/lib/ExtUtils/Command.pm Fri Mar 21 21:45:47 1997 *************** Creates ExtUtils/Command.pm instead of lib/ExtUtils/Command.pm ps: /usr/src/gnu/usr.bin/patch/* contains $Log$ that should be removed. >Audit-Trail: >Unformatted: