patchfiles and specifying -p

Rainer Müller raimue at macports.org
Sat May 15 14:38:56 PDT 2010


On 2010-05-15 20:03 , Blair Zajac wrote:
> How about extending patchfiles to specify the number of directory path elements 
> to strip from the patch, like patch's -p?
> 
> This would allow us to use upstream patches without modification if they are 
> generated with git, which prepends "a/" and "b/" to the paths.

We already have patch.pre_args which is -p0 by default. But this will be
applied to all patchfiles.

> The format could be
> 
> patchfiles foo.diff:2
> 
> which would be equivalent to "patch -p2 < foo.diff".

The colon is already being used to specify subdirectories and tags for
fetching in the same way as it is being used in distfiles:

patchfiles foo.diff:tag
patchfiles foo.diff:subdir:tag

Rainer


More information about the macports-dev mailing list