Ticket #11892: dry.2.patch
File dry.2.patch, 3.3 KB (added by gwhitneycom1@…, 18 years ago) |
---|
-
src/port/port.1
235 235 In batch and interactive mode, exit on the first error encountered. Otherwise, errors during batch execution are simply reported. 236 236 .It Fl p 237 237 Despite any errors encountered, proceed to process multiple ports and commands. 238 .It Fl y 239 Perform a dry run. All of the steps to build the ports and their dependencies are computed, but not actually performed. With the verbose flag, every step is reported; otherwise there is just one message per port, which allows you to easily determine the recursive deps of a port (and the order in which they will be built). 238 240 .It Fl t 239 241 enable trace mode debug facilities on platforms that support it (MacOS X). This feature is two-folded. It consists in automatically detecting and reporting undeclared dependencies based on what files the port reads or what programs the port executes. In verbose mode, it will also report unused dependencies for each stage of the port installation. It also consists in forbidding and reporting file creation and file writes outside allowed directories (temporary directories and ${workpath}). 240 242 .El -
src/port/port.tcl
136 136 global cmdname 137 137 global action_array 138 138 139 set syntax { [-bcdfiknopqRstuvx ] [-D portdir] [-F cmdfile] action [privopts] [actionflags]139 set syntax { [-bcdfiknopqRstuvxy] [-D portdir] [-F cmdfile] action [privopts] [actionflags] 140 140 [[portname|pseudo-portname|port-url] [@version] [+-variant]... [option=value]...]... 141 141 } 142 142 … … 2249 2249 c { set global_options(ports_autoclean) yes } 2250 2250 k { set global_options(ports_autoclean) no } 2251 2251 t { set global_options(ports_trace) yes } 2252 y { set global_options(ports_dryrun) yes } 2252 2253 F { # Name a command file to process 2253 2254 advance 2254 2255 if {[moreargs]} { -
src/port1.0/portutil.tcl
977 977 } 978 978 979 979 ########### Internal Dependency Manipulation Procedures ########### 980 global ports_dry_last_skipped 981 set ports_dry_last_skipped "" 980 982 981 983 proc target_run {ditem} { 982 global target_state_fd portpath portname portversion portrevision portvariants ports_force variations workpath ports_trace PortInfo 984 global target_state_fd portpath portname portversion portrevision portvariants ports_force variations workpath ports_trace PortInfo ports_dryrun ports_dry_last_skipped 983 985 set result 0 984 986 set skipped 0 985 987 set procedure [ditem_key $ditem procedure] … … 1048 1050 } 1049 1051 1050 1052 } 1053 1054 # Of course, if this is a dry run, don't do the task: 1055 if {[info exists ports_dryrun] && $ports_dryrun == "yes"} { 1056 # only one message per portname 1057 if {$portname != $ports_dry_last_skipped} { 1058 ui_msg "For $portname: skipping $name (dry run)" 1059 set ports_dry_last_skipped $portname 1060 } else { 1061 ui_info " .. and skipping $name" 1062 } 1063 set skipped 1 1064 } 1051 1065 1052 1066 # otherwise execute the task. 1053 1067 if {$skipped == 0} {