variable eval and expansion in variant descriptions

Rainer Müller raimue at macports.org
Tue May 12 17:09:00 PDT 2009


On 2009-05-13 01:29, Darren Weber wrote:
> The following example doesn't expand the variable in the results to 'port
> variants <portname>'
> 
> 
> set exDataPath ${prefix}/share/${distname}/data
> 
> variant data description {install example data [default: ${exDataPath}]} {
>     ....
> }
> 
> It would be nice if a user can find this installation information using
> 'port variants <portname>'.  I suppose 'port contents <portname>' is another
> option.

You are currently using {} around the description which makes Tcl treat
this as a literal string. If you want variable expansion and proc
substitution, use "" instead. Of course you need to escape any special
characters in this case.

variant data description "install example data \[default: ${exDataPath}\]" {

Rainer


More information about the macports-dev mailing list