Ticket #33629: patch-port-option-e.diff

File patch-port-option-e.diff, 4.0 KB (added by pixilla (Bradley Giesbrecht), 12 years ago)
  • src/port/port.tcl

     
    4343proc print_usage {{verbose 1}} {
    4444    global cmdname
    4545    set syntax {
    46         [-bcdfknopqRstuvy] [-D portdir] [-F cmdfile] action [privopts] [actionflags]
     46        [-bcdefknopqRstuvy] [-D portdir] [-F cmdfile] action [privopts] [actionflags]
    4747        [[portname|pseudo-portname|port-url] [@version] [+-variant]... [option=value]...]...
    4848    }
    4949
     
    42814281            set opts [string range $arg 1 end]
    42824282            foreach c [split $opts {}] {
    42834283                switch -- $c {
     4284                    e {
     4285                        set ui_options(ports_env) yes
     4286                    }
    42844287                    v {
    42854288                        set ui_options(ports_verbose) yes
     4289                        # verbose implies env
     4290                        set ui_options(ports_env) yes
    42864291                    }
    42874292                    d {
    42884293                        set ui_options(ports_debug) yes
    42894294                        # debug implies verbose
    42904295                        set ui_options(ports_verbose) yes
     4296                        # debug implies env
     4297                        set ui_options(ports_env) yes
    42914298                    }
    42924299                    q {
    42934300                        set ui_options(ports_quiet) yes
     
    47034710# Save off a copy of the environment before mportinit monkeys with it
    47044711global env boot_env
    47054712array set boot_env [array get env]
    4706 
    47074713global argv0
    47084714global cmdname
    47094715set cmdname [file tail $argv0]
     
    47534759    puts "$errorInfo"
    47544760    fatal "Failed to initialize MacPorts, $result"
    47554761}
     4762if {[info exists macports::ui_options(ports_env)]} {
     4763    puts "--->  PATH: $boot_env(PATH)"
     4764}
    47564765
    47574766# Set up some global state for our code
    47584767global current_portdir
  • src/macports1.0/macports.tcl

     
    638638                if {[regexp {^(\w+)([ \t]+(.*))?$} $line match option ignore val] == 1} {
    639639                    if {[lsearch $bootstrap_options $option] >= 0} {
    640640                        set macports::$option [string trim $val]
     641                        if {[info exists macports::ui_options(ports_env)]} {
     642                            puts "--->  ${option}: [string trim $val]"
     643                        }
    641644                        global macports::$option
    642645                    }
    643646                }
     
    682685                    }
    683686                }
    684687                lappend sources [concat [list $url] $flags]
     688                if {[info exists macports::ui_options(ports_env)]} {
     689                    puts "--->  sources_conf: [lindex $sources end]"
     690                }
    685691            } else {
    686692                ui_warn "$sources_conf specifies invalid source '$line', ignored."
    687693            }
     
    715721                            if {![info exists variations($opt)]} {
    716722                                set variations($opt) $sign
    717723                            }
     724                            if {[info exists macports::ui_options(ports_env)]} {
     725                                puts "--->  variants_conf: ${sign}${opt}"
     726                            }
    718727                        } else {
    719728                            ui_warn "$variants_conf specifies invalid variant syntax '$arg', ignored."
    720729                        }
  • doc/port.1

     
    236236.Ar targets :
    237237.Sh OPTIONS
    238238.Bl -tag -width -indent
     239.It Fl e
     240environment mode (generate environment messages)
    239241.It Fl v
    240 verbose mode (generate verbose messages)
     242verbose mode (generate verbose messages, implies
     243.Fl e )
    241244.It Fl d
    242245debug mode (generate debugging messages, implies
    243 .Fl v )
     246.Fl v e )
    244247.It Fl q
    245248quiet mode (suppress messages)
    246249.It Fl n