Ignore:
Timestamp:
Jul 25, 2005, 7:51:05 PM (14 years ago)
Author:
pguyot (Paul Guyot)
Message:

Slave interpreters should now call dport_* instead of dport* (e.g. dport_search)
to call the master's interpreter implementation.
This prevents a case where the slave interpreter loads its own copy of
dportsearch which just doesn't work.

Improved catch error messages by adding $errorInfo if -d is provided.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/src/port1.0/portutil.tcl

    r13185 r13219  
    448448    foreach file $args {
    449449        if {[catch {set tmpfile [mkstemp "/tmp/[file tail $file].sed.XXXXXXXX"]} error]} {
     450                global errorInfo
     451                ui_debug "$errorInfo"
    450452            ui_error "reinplace: $error"
    451453            return -code error "reinplace failed"
     
    458460       
    459461        if {[catch {exec sed $pattern < $file >@ $tmpfd} error]} {
     462                global errorInfo
     463                ui_debug "$errorInfo"
    460464            ui_error "reinplace: $error"
    461465            file delete "$tmpfile"
     
    469473        # We need to overwrite this file
    470474        if {[catch {file attributes $file -permissions u+w} error]} {
     475                global errorInfo
     476                ui_debug "$errorInfo"
    471477            ui_error "reinplace: $error"
    472478            file delete "$tmpfile"
     
    475481       
    476482        if {[catch {exec cp $tmpfile $file} error]} {
     483                global errorInfo
     484                ui_debug "$errorInfo"
    477485            ui_error "reinplace: $error"
    478486            file delete "$tmpfile"
     
    892900    # execute proc with same name as variant.
    893901    if {[catch "variant-${name}" result]} {
     902        global errorInfo
     903        ui_debug "$errorInfo"
    894904        ui_error "Error executing $name: $result"
    895905        return 1
     
    11071117    regsub -all "(\\(){1}|(\\)){1}|(\\{1}){1}|(\\+){1}|(\\{1}){1}|(\\{){1}|(\\}){1}|(\\^){1}|(\\$){1}|(\\.){1}|(\\\\){1}" $portname "\\\\&" search_string
    11081118   
    1109     set res [dportsearch ^$search_string\$]
     1119    set res [dport_search ^$search_string\$]
    11101120    if {[llength $res] < 2} {
    11111121        ui_error "Dependency $portname not found"
     
    11151125    array set portinfo [lindex $res 1]
    11161126    set porturl $portinfo(porturl)
    1117     if {[catch {set worker [dportopen $porturl [array get options] $variations]} result]} {
     1127    if {[catch {set worker [dport_open $porturl [array get options] $variations]} result]} {
     1128                global errorInfo
     1129                ui_debug "$errorInfo"
    11181130        ui_error "Opening $portname $target failed: $result"
    11191131        return -1
    11201132    }
    1121     if {[catch {dportexec $worker $target} result] || $result != 0} {
     1133    if {[catch {dport_exec $worker $target} result] || $result != 0} {
     1134                global errorInfo
     1135                ui_debug "$errorInfo"
    11221136        ui_error "Execution $portname $target failed: $result"
    1123         dportclose $worker
     1137        dport_close $worker
    11241138        return -1
    11251139    }
    1126     dportclose $worker
     1140    dport_close $worker
    11271141   
    11281142    return 0
Note: See TracChangeset for help on using the changeset viewer.