Ticket #13458: patch-macports-state-13458.diff
File patch-macports-state-13458.diff, 3.0 KB (added by raimue (Rainer Müller), 17 years ago) |
---|
-
src/port1.0/portmain.tcl
38 38 39 39 set org.macports.main [target_new org.macports.main main] 40 40 target_provides ${org.macports.main} main 41 target_state ${org.macports.main} no 41 42 42 43 # define options 43 44 options prefix name version revision epoch categories maintainers -
src/port1.0/portlint.tcl
7 7 8 8 set org.macports.lint [target_new org.macports.lint lint_main] 9 9 target_runtype ${org.macports.lint} always 10 target_state ${org.macports.lint} no 10 11 target_provides ${org.macports.lint} lint 11 12 target_requires ${org.macports.lint} main 12 13 target_prerun ${org.macports.lint} lint_start -
src/port1.0/portutil.tcl
1038 1038 set result 0 1039 1039 set skipped 0 1040 1040 set procedure [ditem_key $ditem procedure] 1041 1042 if {[ditem_key $ditem state] != "no"} { 1043 set target_state_fd [open_statefile] 1044 } 1045 1041 1046 if {$procedure != ""} { 1042 1047 set name [ditem_key $ditem name] 1043 1048 … … 1048 1053 if {$result == 0} { 1049 1054 # Skip the step if required and explain why through ui_debug. 1050 1055 # 1st case: the step was already done (as mentioned in the state file) 1051 if {[check_statefile target $name $target_state_fd]} { 1056 if {[ditem_key $ditem state] != "no" 1057 && [check_statefile target $name $target_state_fd]} { 1052 1058 ui_debug "Skipping completed $name ($portname)" 1053 1059 set skipped 1 1054 1060 # 2nd case: the step is not to always be performed … … 1233 1239 set result 1 1234 1240 } 1235 1241 1242 if {[ditem_key $ditem state] != "no"} { 1243 close $target_state_fd 1244 } 1245 1236 1246 return $result 1237 1247 } 1238 1248 … … 1285 1295 } 1286 1296 } 1287 1297 1288 # Restore the state from a previous run.1289 set target_state_fd [open_statefile]1290 1291 1298 set dlist [dlist_eval $dlist "" target_run] 1292 1299 1293 1300 if {[llength $dlist] > 0} { … … 1302 1309 set result 0 1303 1310 } 1304 1311 1305 close $target_state_fd1306 1312 return $result 1307 1313 } 1308 1314 … … 1564 1570 # - Skip this test if the statefile is empty. 1565 1571 # - Skip this test if performing a clean or submit. 1566 1572 # - Skip this test if ports_force was specified. 1567 1568 if { [lsearch "clean submit" $target] < 0 && 1573 1574 # TODO: Don't hardcode this list of targets here, 1575 # check for [ditem_key $mport state] == "no" somewhere else instead 1576 if { [lsearch "clean submit lint livecheck" $target] < 0 && 1569 1577 !([info exists ports_force] && $ports_force == "yes")} { 1570 1578 1571 1579 set state_fd [open_statefile]