Ticket #11892: dry.4.patch
File dry.4.patch, 4.0 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 … … 2273 2273 c { set global_options(ports_autoclean) yes } 2274 2274 k { set global_options(ports_autoclean) no } 2275 2275 t { set global_options(ports_trace) yes } 2276 y { set global_options(ports_dryrun) yes } 2276 2277 F { # Name a command file to process 2277 2278 advance 2278 2279 if {[moreargs]} { -
src/port1.0/portutil.tcl
1006 1006 } 1007 1007 1008 1008 ########### Internal Dependency Manipulation Procedures ########### 1009 global ports_dry_last_skipped 1010 set ports_dry_last_skipped "" 1009 1011 1010 1012 proc target_run {ditem} { 1011 global target_state_fd portpath portname portversion portrevision portvariants ports_force variations workpath ports_trace PortInfo 1013 global target_state_fd portpath portname portversion portrevision portvariants ports_force variations workpath ports_trace PortInfo ports_dryrun ports_dry_last_skipped 1012 1014 set result 0 1013 1015 set skipped 0 1014 1016 set procedure [ditem_key $ditem procedure] … … 1077 1079 } 1078 1080 1079 1081 } 1082 1083 # Of course, if this is a dry run, don't do the task: 1084 if {[info exists ports_dryrun] && $ports_dryrun == "yes"} { 1085 # only one message per portname 1086 if {$portname != $ports_dry_last_skipped} { 1087 ui_msg "For $portname: skipping $name (dry run)" 1088 set ports_dry_last_skipped $portname 1089 } else { 1090 ui_info " .. and skipping $name" 1091 } 1092 set skipped 1 1093 } 1080 1094 1081 1095 # otherwise execute the task. 1082 1096 if {$skipped == 0} { … … 1432 1446 } 1433 1447 1434 1448 proc check_variants {variations target} { 1435 global ports_force PortInfo1449 global ports_force ports_dryrun PortInfo 1436 1450 upvar $variations upvariations 1437 1451 set result 0 1438 1452 set portname $PortInfo(name) … … 1452 1466 if {[check_statefile_variants upvariations $state_fd]} { 1453 1467 ui_error "Requested variants do not match original selection.\nPlease perform 'port clean $portname' or specify the force option." 1454 1468 set result 1 1455 } else { 1469 } elseif {!([info exists ports_dryrun] 1470 && $ports_dryrun == "yes")} { 1456 1471 # Write variations out to the statefile 1457 1472 foreach key [array names upvariations *] { 1458 1473 write_statefile variant $upvariations($key)$key $state_fd