On Fri, Oct 05, 2007 at 04:37:36PM -0400, Alexander K. Hansen wrote:
> There's been talk on IRC about trying to get people to switch from
> Patch: to PatchFile:.  However, I have encountered a situation in one of
> my own packages in which the benefits of PatchFile can't be fully utilized.
> 
> In maxima(-nox) I declare
> 
> Patch: %n.patch
> 
> i.e. maxima uses maxima.patch and maxima-nox uses maxima-nox.patch. 
> maxima-nox.patch has a block that is identical to maxima.patch, so I
> could in principle make that part a common PatchFile for both, and then
> apply the patching specific to maxima-nox separately, but that second
> patching operation doesn't get any of the benefits of PatchFile.
> 
> I'd prefer not to have to go to separate .info files and thereby lose
> out on the convenience of Variants.
> 
> Is there a better way to handle this,

In this case, it looks like there's just a simple piece that is
applied in one variant but not the other. You could have a file
containing that patch (instead of the patch itself) in all variants
and then only apply it in those variants that need it (bash
conditional in PatchScript). This specific case is just a matter of
picking one of two strings in two places, so you could have a unified
patch that placed some replaceable @[EMAIL PROTECTED] there and then have
PatchScript substitute whatever value is appropriate for each variant.

> other than changing fink to handle multiple PatchFiles? ;-)

We'd actually considered PatchFileN, but didn't have a need for it. Thanks:/

dan

-- 
Daniel Macks
[EMAIL PROTECTED]
http://www.netspace.org/~dmacks


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fink-devel

Reply via email to