tcl expert needed

Ryan Schmidt ryandesign at
Sat Jun 2 23:12:32 PDT 2012

On Jun 2, 2012, at 18:34, Bjarne D Mathiesen wrote:

> Jeremy Lavergne wrote:
>>> I've got a problem where the same action has to be done, but depending
>>> on whether I'm in /post-destroot/ or /post-activate/ I need to create
>>> and install in different directories
>> That's precisely what the post-destroot and post-activate blocks do: they execute during post-destroot phase or post-activate phase, respectively.
> I know that, but can I query a variable or something that tells me
> exactly which phase I'm in ???

Not that I know of.

> eg :
> proc doSomething args {
>    switch ${phase} {
>    "destroot"      -
>    "post-destroot" { set where "destroot" }
>    "activate"      -
>    "post-activate" { set where "" }
>    }
>    xinstall -d ${where}[dict get ${apache} libexecdir]
>    /do a lot of stuff/
> }

What is the specific task you're going to do? Depending on the task, you probably want to either always do it in destroot, or always in activate; I can't think of a case where you'd want to make that dependent on some situation.

More information about the macports-users mailing list