New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Changeset 79421


Ignore:
Timestamp:
06/13/11 00:25:18 (4 years ago)
Author:
jmr@…
Message:

add 'actinact' pseudo-portname that expands to ports with both active and inactive versions (#27666)

Location:
trunk/base
Files:
2 edited

Legend:

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

    r77511 r79421  
    103103.Ar inactive : 
    104104set of installed but inactive ports. 
     105.Pp 
     106.It 
     107.Ar actinact : 
     108set of installed ports that have both an active version and one or more inactive versions. 
    105109.Pp 
    106110.It 
  • trunk/base/src/port/port.tcl

    r79365 r79421  
    8888Pseudo-portnames are words that may be used in place of a portname, and 
    8989which expand to some set of ports. The common pseudo-portnames are: 
    90 all, current, active, inactive, installed, uninstalled, outdated, obsolete, 
    91 requested, unrequested and leaves. 
     90all, current, active, inactive, actinact, installed, uninstalled, outdated, 
     91obsolete, requested, unrequested and leaves. 
    9292These pseudo-portnames expand to the set of ports named. 
    9393 
     
    765765} 
    766766 
     767proc get_actinact_ports {} { 
     768    set inactive_ports [get_inactive_ports] 
     769    set active_ports [get_active_ports] 
     770    set results {} 
     771 
     772    foreach port $inactive_ports { 
     773        array set portspec $port 
     774        set portname $portspec(name) 
     775        lappend inact($portname) $port 
     776    } 
     777 
     778    foreach port $active_ports { 
     779        array set portspec $port 
     780        set portname $portspec(name) 
     781 
     782        if {[info exists inact($portname)]} { 
     783            if {![info exists added_inact($portname)]} { 
     784                foreach inact_spec $inact($portname) { 
     785                    lappend results $inact_spec 
     786                } 
     787                set added_inact($portname) 1 
     788            } 
     789            lappend results $port 
     790        } 
     791    } 
     792    return $results 
     793} 
     794 
    767795 
    768796proc get_outdated_ports {} { 
     
    12151243        ^active(@.*)?$      - 
    12161244        ^inactive(@.*)?$    - 
     1245        ^actinact(@.*)?$    - 
    12171246        ^leaves(@.*)?$      - 
    12181247        ^outdated(@.*)?$    - 
Note: See TracChangeset for help on using the changeset viewer.