Projects
New Ticket     Wiki     Browse Source     Timeline     Roadmap     Bug Reports     Search

Changeset 37119

Show
Ignore:
Timestamp:
2008-05-26 16:59:56 (6 months ago)
Author:
raimue@…
Message:

port/port.tcl:
port search looks now in name, description and long_description for the search
pattern and prints the list sorted.
Fixes #15434.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/base/src/port/port.tcl

    r37118 r37119  
    19551955 
    19561956        set portfound 0 
    1957         if {[catch {set res [mportsearch $portname no]} result]} { 
     1957        set res {} 
     1958        if {[catch {set matches [mportsearch "*$portname*" no glob name]} result]} { 
    19581959            global errorInfo 
    19591960            ui_debug "$errorInfo" 
    1960             break_softcontinue "search for portname $portname failed: $result" 1 status 
    1961         } 
     1961            break_softcontinue "search for name $portname failed: $result" 1 status 
     1962        } 
     1963        set tmp {} 
     1964        foreach {name info} $matches { 
     1965            add_to_portlist tmp [concat [list name $name] $info] 
     1966        } 
     1967        set res [opUnion $res $tmp] 
     1968        if {[catch {set matches [mportsearch "*$portname*" no glob description]} result]} { 
     1969            global errorInfo 
     1970            ui_debug "$errorInfo" 
     1971            break_softcontinue "search for description $portname failed: $result" 1 status 
     1972        } 
     1973        set tmp {} 
     1974        foreach {name info} $matches { 
     1975            add_to_portlist tmp [concat [list name $name] $info] 
     1976        } 
     1977        set res [opUnion $res $tmp] 
     1978        if {[catch {set matches [mportsearch "*$portname*" no glob long_description]} result]} { 
     1979            global errorInfo 
     1980            ui_debug "$errorInfo" 
     1981            break_softcontinue "search for long_description $portname failed: $result" 1 status 
     1982        } 
     1983        set tmp {} 
     1984        foreach {name info} $matches { 
     1985            add_to_portlist tmp [concat [list name $name] $info] 
     1986        } 
     1987        set res [opUnion $res $tmp] 
     1988        set res [portlist_sort $res] 
     1989 
    19621990        set joiner "" 
    1963         foreach {name array} $res { 
     1991        foreach info $res { 
    19641992            array unset portinfo 
    1965             array set portinfo $array 
     1993            array set portinfo $info 
    19661994 
    19671995            # XXX is this the right place to verify an entry?