port [options]
Bradley Giesbrecht
brad at pixilla.com
Sat Aug 14 10:25:19 PDT 2010
On Aug 14, 2010, at 10:17 AM, Bradley Giesbrecht wrote:
> In what file are port options like {-v, -d and -q} processed?
>
> Is there a var set for debug like portverbose?
>
> I'm wanting to patch portfetch.tcl and need to know if -v or -d
> options are in use.
>
> My interest is in having hg fetch be more verbose with -v or -d
> option. ${portverbose} looks like a good for -v. Maybe ::debuglog
> for -d?
>
> BTW, I'm unfamiliar with TCL.
I was thinking if port -d was used we don't need ui_msg "cmdstring:
$cmdstring".
--- portfetch.tcl.orig 2010-08-14 10:21:48.000000000 -0700
+++ portfetch.tcl 2010-08-14 10:22:13.000000000 -0700
@@ -403,8 +403,18 @@
proc portfetch::hgfetch {args} {
global worksrcpath prefix_frozen
global hg.url hg.tag hg.cmd
+ global portverbose
- set cmdstring "${hg.cmd} clone --rev ${hg.tag} ${hg.url} $
{worksrcpath} 2>&1"
+ set fetch_options {}
+ set output_redirect {2>&1}
+ if {$portverbose == "yes"} {
+ lappend fetch_options "--verbose"
+ set output_redirect {}
+ }
+ set cmdstring "${hg.cmd} clone ${fetch_options} --rev ${hg.tag} $
{hg.url} ${worksrcpath} ${output_redirect}"
+ if {$portverbose == "yes"} {
+ ui_msg "cmdstring: $cmdstring"
+ }
ui_debug "Executing: $cmdstring"
if {[catch {system $cmdstring} result]} {
return -code error [msgcat::mc "Mercurial clone failed"]
More information about the macports-dev
mailing list