Date: Fri, 16 Jan 1998 23:23:38 -0600 From: "Scot W. Hetzel" <hetzels@westbend.net> To: <freebsd-ports@FreeBSD.ORG> Subject: Re: Patch Problem Message-ID: <004001bd2308$11051c20$c3e0d9cf@admin.westbend.net>
next in thread | raw e-mail | index | archive | help
>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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?004001bd2308$11051c20$c3e0d9cf>