New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Changeset 80971


Ignore:
Timestamp:
07/22/11 14:03:02 (4 years ago)
Author:
jmr@…
Message:

don't clobber other variant info when setting is_default

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/src/port1.0/portutil.tcl

    r80797 r80971  
    20212021 
    20222022            foreach v $value { 
    2023                 if {[regexp {([-+])([-A-Za-z0-9_]+)} $v whole val variant]} { 
     2023                if {[regexp {([-+])([-A-Za-z0-9_]+)} $v whole val variant] && ![info exists variations($variant)]} { 
    20242024                    # Retrieve the information associated with this variant. 
    20252025                    if {![info exists vinfo($variant)]} { 
    20262026                        set vinfo($variant) {} 
    20272027                    } 
     2028                    array unset info 
    20282029                    array set info $vinfo($variant) 
    2029  
    2030                     if {![info exists variations($variant)]} { 
    2031                         # Set is_default and update vinfo. 
    2032                         array set vinfo [list $variant [list is_default $val]] 
    2033  
    2034                         set variations($variant) $val 
    2035                     } 
     2030                    # Set is_default and update vinfo. 
     2031                    set info(is_default) $val 
     2032                    array set vinfo [list $variant [array get info]] 
     2033 
     2034                    set variations($variant) $val 
    20362035                } 
    20372036            } 
Note: See TracChangeset for help on using the changeset viewer.