-v being a bit too chatty
Joshua Root
jmr at macports.org
Sat Jan 30 04:18:40 PST 2016
On 2016-1-30 21:16 , René J.V. Bertin wrote:
> Hi,
>
> My qt5-kde port has the following bit of code that adds the appropriate -sdk option to configure.args:
>
> {{{
> # default: build for the current OS version, requesting the corresponding SDK explicitly
> if {[catch {system "xcrun --show-sdk-path -sdk macosx10.${OSX_MINOR}"} result]} {
> ui_debug "Couldn't find preferred SDK macosx10.${OSX_MINOR}: ${result}"
> # the preferred matching SDK isn't available; check if the default SDK is
> SNIP
> } else {
> ui_debug "Using SDK macosx10.${OSX_MINOR} : ${result}"
> configure.args-append \
> -sdk [string tolower "macosx10.${OSX_MINOR}"]
> }
> }}}
>
> I had been noticing that `port {-vy install|-v info} somePortDependingOnQT5` printed the full path to the preferred SDK, and finally traced that back to the `catch {system "xcrun ..."}]` statement above.
>
> 2 questions:
> - why is the Qt5-kde Portfile parsed when port:qt5-kde is uptodate?
> - is there a way to silence output from `catch {system ...` even with the -v option? I thought the role of the catch function was also to ... catch the called function's output?
If you don't want the output printed and logged, don't use 'system',
that's what it's for.
- Josh
More information about the macports-dev
mailing list