[41513] trunk/dports/devel

Ryan Schmidt ryandesign at macports.org
Wed Nov 5 20:31:37 PST 2008


On Nov 5, 2008, at 22:22, Bryan Blackburn wrote:

> On Wed, Nov 05, 2008 at 09:53:11PM -0600, Ryan Schmidt said:
>
>>> Perhaps a different approach could be to use just a placeholder in
>>> master_sites:
>>>
>>> master_sites ${homepage}attachment/wiki/WikiStart/<file>?
>>> format=raw&dummy=
>>>
>>> or something to that effect (since <> are not valid in HTTP URLs).
>>> When no
>>> <file> is present, append to the end like we do now.
>>
>> Placeholder sounds very good. I might prefer a sprintf  
>> placeholder, like
>> %s (% isn't valid by itself in a URL either).
>
> % is valid for escaping; I wanted to pick something that wouldn't  
> otherwise
> appear in any URL so the template-replacing code would be simpler.

But %s by itself is not valid in URLs, and %s is the standard string  
replacement placeholder for the printf function. Um, which in tcl is  
the format function. So the replacement code is simple:

[format ${url} ${distfile}]

Or something like that.



More information about the macports-dev mailing list