Ticket #289: portindex.tcl.diff

File portindex.tcl.diff, 978 bytes (added by jpm@…, 22 years ago)

diff to add catch around Portfile interp

  • base/src/port/portindex.tcl

    RCS file: /Volumes/src/cvs/od/proj/darwinports/base/src/port/portindex.tcl,v
    retrieving revision 1.12
    diff -u -d -b -w -r1.12 portindex.tcl
     
    3939
    4040proc pindex {portdir} {
    4141    global target fd directory archive outdir
    42     set interp [dportopen file://[file join $directory $portdir]]
     42   
     43    if {[catch {set interp [dportopen file://[file join $directory $portdir]]} result]} {
     44        puts "Skipping illegally formatted file: $portdir/Portfile"
     45    } else {       
    4346    array set portinfo [dportinfo $interp]
    4447    dportclose $interp
    4548    set portinfo(portdir) $portdir
     
    6366    set len [expr [string length $output] + 1]
    6467    puts $fd "$portinfo(name) $len"
    6568    puts $fd $output
     69    }
    6670}
    6771
    6872if {[expr $argc > 4]} {