Changeset 47253


Ignore:
Timestamp:
Feb 24, 2009, 5:26:10 AM (12 years ago)
Author:
raimue@…
Message:

src/port, doc/port.1:
Add new pseudo-port obsolete to identify ports which are installed but do not
exist in the PortIndex anymore.

Location:
trunk/base
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/doc/port.1

    r46109 r47253  
    116116installed ports that are out of date with respect to their current version/revision in the ports tree(s)
    117117.Pp
     118.It
     119.Ar obsolete :
     120set of ports that are installed but no longer exist in any port tree
     121.Pp
    118122.El
    119123Other options, also known as
  • trunk/base/src/port/port.tcl

    r47110 r47253  
    9090Pseudo-portnames are words that may be used in place of a portname, and
    9191which expand to some set of ports. The common pseudo-portnames are:
    92 all, current, active, inactive, installed, uninstalled, and outdated.
     92all, current, active, inactive, installed, uninstalled, outdated and obsolete.
    9393These pseudo-portnames expand to the set of ports named.
    9494
     
    737737
    738738
     739proc get_obsolete_ports {} {
     740    set ilist [get_installed_ports]
     741    set results {}
     742
     743    foreach i $ilist {
     744        array set port $i
     745
     746        if {[catch {mportlookup $port(name)} result]} {
     747            ui_debug "$::errorInfo"
     748            break_softcontinue "lookup of portname $portname failed: $result" 1 status
     749        }
     750
     751        if {[llength $result] < 2} {
     752            lappend results $i
     753        }
     754    }
     755
     756    # Return the list of ports, already sorted
     757    return [portlist_sort $results]
     758}
     759
    739760
    740761##########################################
     
    883904        ^inactive(@.*)?$    -
    884905        ^outdated(@.*)?$    -
     906        ^obsolete(@.*)?$    -
    885907        ^current(@.*)?$     {
    886908            # A simple pseudo-port name
Note: See TracChangeset for help on using the changeset viewer.