Ticket #30593: macports30593.diff

File macports30593.diff, 911 bytes (added by kurthindenburg (Kurt Hindenburg), 13 years ago)

Patch to fix this issue

  • macports.tcl

    old new  
    23122312
    23132313    set sourceno 0
    23142314    set matches [list]
     2315    set index_file_missing 0
    23152316    foreach source $sources {
    23162317        set source [lindex $source 0]
    23172318        set protocol [macports::getprotocol $source]
     
    23282329            incr sourceno 1
    23292330            if {[catch {set fd [open [macports::getindex $source] r]} result]} {
    23302331                ui_warn "Can't open index file for source: $source"
     2332                set index_file_missing 1
    23312333            } else {
    23322334                try {
    23332335                    seek $fd $offset
     
    23872389        }
    23882390    }
    23892391
     2392    # User deleted their PortIndex, try using mportsearch
     2393    if {$index_file_missing && ([llength $matches] == 0)} {
     2394        set matches [mportsearch $name no exact name]
     2395    }
    23902396    return $matches
    23912397}
    23922398