From owner-freebsd-ports Fri Jan 16 21:24:56 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id VAA04093 for freebsd-ports-outgoing; Fri, 16 Jan 1998 21:24:56 -0800 (PST) (envelope-from owner-freebsd-ports@FreeBSD.ORG) Received: from mail.westbend.net (ns1.westbend.net [207.217.224.194]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id VAA04089 for ; Fri, 16 Jan 1998 21:24:48 -0800 (PST) (envelope-from hetzels@westbend.net) Received: from admin (admin.WestBend.NET [207.217.224.195]) by mail.westbend.net (8.8.8/8.8.7) with SMTP id XAA00235 for ; Fri, 16 Jan 1998 23:24:46 -0600 (CST) (envelope-from hetzels@westbend.net) Message-ID: <004001bd2308$11051c20$c3e0d9cf@admin.westbend.net> From: "Scot W. Hetzel" To: Subject: Re: Patch Problem Date: Fri, 16 Jan 1998 23:23:38 -0600 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 4.72.2106.4 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4 Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >I made a patch for a port I created, but when I tried to apply the patch to >the original sources it didn't work as it was patching the wrong Makefile. > >The problem: > >Directories in "port.cat": > >-rwxrwxr-- Makefile >drwxrwxr-x myport Note: myport contains a modified Makefile of the original port (myport.orig). >drwxrwxr-x myport.orig >-rwxrwxr-- myport.orig.tgz > >I create the patch as follows: > >diff -ruN myport.orig myport > myport.diff Now to test the Patch since nobody is supposed to have the directory myport.orig in their ports tree. I move the directories so that I don't loose my changes, and so that patch only sees the old port. >mv myport myport.new >mv myport.orig myport I apply the patch from the port.cat directory >patch < myport.diff > Hmm... Looks like a unified diff to me... The text leading up to this was: -------------------------- |diff -ruN myport.orig/Makefile myport/Makefile |--- myport.orig/Makefile Tue Oct 28 13:18:12 1997 |+++ myport/Makefile Wed Jan 14 00:04:21 1998 -------------------------- Patching file Makefile using Plan A... Hunk #1 failed at 1. Hunk #2 failed at 19. Hunk #3 failed at 30. Hunk #4 failed at 37. Hunk #5 failed at 47. 5 out of 5 hunks failed--saving rejects to Makefile.rej done How do I use patch so that it will patch the Makefile in the myport directory, instead of the port.cat directory? Tried changing to the myport directory and that didn't work either. Note: If I create a directory test & move myport to that directory and apply the patch from within the test directory, then it will work? Note: I was getting 2 rej files as the patch was actually patching 2 separate Makefiles (myport/, & myport/files/ ). Note: This is with patch 2.1 on 2.2-stable (cvsuped on Jan 9). Scot