Ticket #47442: patch-base-environment-action-mode.diff
File patch-base-environment-action-mode.diff, 5.3 KB (added by pixilla (Bradley Giesbrecht), 10 years ago) |
---|
-
doc/port.1
462 462 Debug mode, generate debugging messages, implies \-v 463 463 .RE 464 464 .PP 465 \-e 466 .RS 4 467 Enviroment mode, generates environment messages 468 .RE 469 .PP 465 470 \-q 466 471 .RS 4 467 472 Quiet mode, suppress informational messages to a minimum, implies \-N -
doc/port.1.txt
129 129 -d:: 130 130 Debug mode, generate debugging messages, implies -v 131 131 132 -e:: 133 Enviroment mode, generates environment messages 134 132 135 -q:: 133 136 Quiet mode, suppress informational messages to a minimum, implies -N 134 137 -
src/macports1.0/macports.tcl
93 93 return ${macports::autoconf::macports_version} 94 94 } 95 95 96 ## 97 # Return the port environment variables. 98 proc macports::environment {} { 99 set mpenv {} 100 if {![macports::ui_isset ports_quiet]} { 101 lappend mpenv "$macports::ui_prefix port_cmd_version: ${macports::autoconf::macports_version}" 102 } else { 103 lappend mpenv "port_cmd_version ${macports::autoconf::macports_version}" 104 } 105 if {[info exists macports::bootstrap_options]} { 106 foreach bootstrap_option [lsort $macports::bootstrap_options] { 107 if {[info exists macports::$bootstrap_option]} { 108 if {![macports::ui_isset ports_quiet]} { 109 lappend mpenv "$macports::ui_prefix bootstrap_options: $bootstrap_option: [set macports::$bootstrap_option]" 110 } else { 111 lappend mpenv "bootstrap_options $bootstrap_option [set macports::$bootstrap_option]" 112 } 113 } 114 } 115 } 116 if {[info exists macports::sources]} { 117 foreach source $macports::sources { 118 if {![macports::ui_isset ports_quiet]} { 119 lappend mpenv "$macports::ui_prefix port_tree_sources: $source" 120 } else { 121 lappend mpenv "port_tree_sources $source" 122 } 123 } 124 } 125 if {[info exists macports::global_variations]} { 126 set gvl {} 127 foreach {variation mode} [array get macports::global_variations] { 128 lappend gvl $mode$variation 129 } 130 if {![macports::ui_isset ports_quiet]} { 131 lappend mpenv "$macports::ui_prefix global_variations: [join $gvl { }]" 132 } else { 133 lappend mpenv "global_variations [join $gvl { }]" 134 } 135 } 136 ui_msg "[join $mpenv \n]" 137 return 0 138 } 139 96 140 # Provided UI instantiations 97 141 # For standard messages, the following priorities are defined 98 142 # debug, info, msg, warn, error … … 697 741 if {[lsearch -exact $bootstrap_options $option] >= 0} { 698 742 set macports::$option [string trim $val] 699 743 global macports::$option 744 if {[info exists macports::ui_options(ports_env)]} { 745 ui_msg "$macports::ui_prefix $file: ${option}: [set macports::$option]" 746 } 700 747 } 701 748 } 702 749 } … … 713 760 if {[lsearch -exact $user_options $option] >= 0} { 714 761 set macports::$option $val 715 762 global macports::$option 763 if {[info exists macports::ui_options(ports_env)]} { 764 ui_msg "$macports::ui_prefix user: ${option}: [set macports::$option]" 765 } 716 766 } 717 767 } 718 768 } … … 740 790 } 741 791 } 742 792 lappend sources [concat [list $url] $flags] 793 if {[info exists macports::ui_options(ports_env)]} { 794 ui_msg "$macports::ui_prefix $sources_conf: [lindex $sources end]" 795 } 743 796 } else { 744 797 ui_warn "$sources_conf specifies invalid source '$line', ignored." 745 798 } -
src/port/port.tcl
2812 2812 } 2813 2813 2814 2814 2815 proc action_environment { action portlist opts } { 2816 set status [macports::environment] 2817 return $status 2818 } 2819 2820 2815 2821 proc action_platform { action portlist opts } { 2816 2822 if {![macports::ui_isset ports_quiet]} { 2817 2823 puts -nonewline "Platform: " … … 4241 4247 diagnose [list action_diagnose [ACTION_ARGS_NONE]] \ 4242 4248 \ 4243 4249 version [list action_version [ACTION_ARGS_NONE]] \ 4250 environment [list action_environment [ACTION_ARGS_NONE]] \ 4244 4251 platform [list action_platform [ACTION_ARGS_NONE]] \ 4245 4252 \ 4246 4253 uninstall [list action_uninstall [ACTION_ARGS_PORTS]] \ … … 4498 4505 set opts [string range $arg 1 end] 4499 4506 foreach c [split $opts {}] { 4500 4507 switch -- $c { 4508 e { 4509 set ui_options(ports_env) yes 4510 } 4501 4511 v { 4502 4512 set ui_options(ports_verbose) yes 4503 4513 }