querying arbitrary variables via `port info --var`

René J.V. Bertin rjvbertin at gmail.com
Mon Oct 26 05:22:03 PDT 2015


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.

> 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.

R.


More information about the macports-dev mailing list