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

     
    3838
    3939set org.macports.main [target_new org.macports.main main]
    4040target_provides ${org.macports.main} main
     41target_state ${org.macports.main} no
    4142
    4243# define options
    4344options prefix name version revision epoch categories maintainers
  • src/port1.0/portlint.tcl

     
    77
    88set org.macports.lint [target_new org.macports.lint lint_main]
    99target_runtype ${org.macports.lint} always
     10target_state ${org.macports.lint} no
    1011target_provides ${org.macports.lint} lint
    1112target_requires ${org.macports.lint} main
    1213target_prerun ${org.macports.lint} lint_start
  • src/port1.0/portutil.tcl

     
    10381038    set result 0
    10391039    set skipped 0
    10401040    set procedure [ditem_key $ditem procedure]
     1041           
     1042    if {[ditem_key $ditem state] != "no"} {
     1043        set target_state_fd [open_statefile]
     1044    }
     1045       
    10411046    if {$procedure != ""} {
    10421047        set name [ditem_key $ditem name]
    10431048   
     
    10481053        if {$result == 0} {
    10491054            # Skip the step if required and explain why through ui_debug.
    10501055            # 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]} {
    10521058                ui_debug "Skipping completed $name ($portname)"
    10531059                set skipped 1
    10541060            # 2nd case: the step is not to always be performed
     
    12331239        set result 1
    12341240    }
    12351241   
     1242    if {[ditem_key $ditem state] != "no"} {
     1243        close $target_state_fd
     1244    }
     1245
    12361246    return $result
    12371247}
    12381248
     
    12851295        }
    12861296    }
    12871297   
    1288     # Restore the state from a previous run.
    1289     set target_state_fd [open_statefile]
    1290    
    12911298    set dlist [dlist_eval $dlist "" target_run]
    12921299   
    12931300    if {[llength $dlist] > 0} {
     
    13021309        set result 0
    13031310    }
    13041311   
    1305     close $target_state_fd
    13061312    return $result
    13071313}
    13081314
     
    15641570    # - Skip this test if the statefile is empty.
    15651571    # - Skip this test if performing a clean or submit.
    15661572    # - 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 &&
    15691577        !([info exists ports_force] && $ports_force == "yes")} {
    15701578       
    15711579        set state_fd [open_statefile]