On Oct 26, 2015, at 7:22 AM, René J.V. Bertin wrote:

> On Monday October 26 2015 12:59:38 Rainer Müller wrote:
> 
>> My idea of 'port dump' was to only output options with their values once
>> after parsing the Portfile.
> 
> How would that be different from what `port info` does currently?
> 
>> You can't get the value after a specific phase without execution of that
>> phase. Your proposal sounds more like a deeper debug log level instead
>> of a new port(1) action.
> 
> `port -s` shows what would be done without actually doing it. Standard 
> portfiles have pre- and post-phases, but don't alter the actual phase, so it 
> should be possible to do e.g. `port dump configure` which calls the port's 
> pre-configure if it exists, but then prints out variables instead of invoking 
> the actual configure phase. Maybe `-s` already works that way?
> It'd be up to the port dev to know what side-effects the pre-phases have.

A port might do things in its pre-configure or pre-build phases that work on 
the files in the work directory. For example, it might copy a file, or compile 
a file. These operations would fail if you're just trying to get info about the 
port, because the work directory wouldn't exist.


>> To get the difference, just take a snapshot of all options' values
> 
> Am I right there's a macro that handles expressions like `configure.args 
> -foo` or `configure.args-append -foo`? If so, that or those macros could have 
> an option to dump trace information to the logfile, as a really basic 
> implementation of what I was hoping to achieve.

Look at the following procedures in src/port1.0/portutil.tcl:

handle_option
handle_option-append
handle_option-prepend
handle_option-delete
handle_option-strsed
handle_option-replace

_______________________________________________
macports-dev mailing list
[email protected]
https://lists.macosforge.org/mailman/listinfo/macports-dev

Reply via email to