docs/82705: [PATCH] porters handbook - 4.6 patching - add note for context l

Woody Carey woodycarey at hotmail.com
Fri Jul 15 05:10:31 UTC 2005


Key words:  "if you generate your patch from WRKDIR".  To do this is not 
explicitly stated
in the porters handbook.  Maybe add it?

You may be right.  I am new at doing things like diffing and patching.  The 
reason I
wrote this is because I had a problem where I was writing a new port 
makefile, which
was downloading my patches from my website, and patch kept prompting me for 
which
file to patch.  Obviously a problem.  So, I added more context lines to my 
diff -C , and this solved my problem.  The patches then applied 
non-interactively.

I may of course, have done something else different which fixed the problem 
I was having.

I think the key point is that you say to generate the diffs from your 
WRKDIR, which is fine,
however, please keep in mind, when I or somebody else initially does a new 
port, they often download the tarball to their $HOME directory, unpack the 
tarball, copy the directory for originals to diff against, and hack away on 
it until it builds.  Now, the files
you want to diff are in ~/foo/source and ~/foo-copy/source, not 
/usr/ports/foo/bar/%WRKDIR or whatever.   Perhaps a note to put in instead 
of what I have originally goes as follows:

Slow Porting:

Write your port makefile in stages:
1) write it to 'make fetch' the tarball
2) write the part that does the 'extract'
3) Now hack on it in WRKDIR and generate your diffs from their, so that your 
patches will apply cleanly.  Write your 'patch' target. (or do-patch or 
$PATCH or whatever)
4) Now add your 'configure', 'build' and 'install' stages incrementally.

Ideas, comments, pav, or anybody?

Regards,

Woody Carey

>From: Pav Lucistnik <pav at FreeBSD.org>
>To: woodycarey at hotmail.com, pav at FreeBSD.org, freebsd-doc at FreeBSD.org,       
>  pav at FreeBSD.org
>Subject: Re: docs/82705: [PATCH] porters handbook - 4.6 patching - add note 
>for context lines >=3
>Date: Thu, 14 Jul 2005 23:44:31 GMT
>
>Synopsis: [PATCH] porters handbook - 4.6 patching - add note for context 
>lines >=3
>
>State-Changed-From-To: open->feedback
>State-Changed-By: pav
>State-Changed-When: Thu Jul 14 23:43:42 GMT 2005
>State-Changed-Why:
>This looks bogus to me - it will never prompt if you generate the patch
>from the WRKDIR directory, and it will prompt every time if you generate it
>from elsewhere. Amount of context lines have nothing to do with this.
>
>Or not?
>
>
>Responsible-Changed-From-To: freebsd-doc->pav
>Responsible-Changed-By: pav
>Responsible-Changed-When: Thu Jul 14 23:43:42 GMT 2005
>Responsible-Changed-Why:
>Poke
>
>http://www.freebsd.org/cgi/query-pr.cgi?pr=82705

_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar – get it now! 
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/




More information about the freebsd-doc mailing list