patch.pre_args v patch.args for -p#

Ryan Schmidt ryandesign at macports.org
Wed Jul 20 18:43:52 PDT 2011


On Jul 20, 2011, at 19:50, Jeremy Lavergne wrote:

> We're inconsistent in how we handle the -p# flag for patch.
> 
> audio/id3lib/Portfile:patch.pre_args     -p1
> comms/gnokii/Portfile:patch.args      -p1
> 
> Documentation says patch.pre_args: shall we go through and tweak these to reflect the desired behavior to better serve as examples to new maintainers?

Yes.

patch.pre_args is the correct place for the -p argument. See the Guide and the MacPorts base source code.

http://guide.macports.org/chunked/reference.phases.html#reference.phases.patch

http://trac.macports.org/browser/trunk/base/src/port1.0/portpatch.tcl?rev=79593#L54

When running "sudo port -d patch gnokii" for example we see it's running "/usr/bin/patch -p0 -p1" which is silly.





More information about the macports-dev mailing list