[80971] trunk/base/src/port1.0/portutil.tcl

jmr at macports.org jmr at macports.org
Fri Jul 22 14:03:03 PDT 2011


Revision: 80971
          http://trac.macports.org/changeset/80971
Author:   jmr at macports.org
Date:     2011-07-22 14:03:02 -0700 (Fri, 22 Jul 2011)
Log Message:
-----------
don't clobber other variant info when setting is_default

Modified Paths:
--------------
    trunk/base/src/port1.0/portutil.tcl

Modified: trunk/base/src/port1.0/portutil.tcl
===================================================================
--- trunk/base/src/port1.0/portutil.tcl	2011-07-22 20:52:46 UTC (rev 80970)
+++ trunk/base/src/port1.0/portutil.tcl	2011-07-22 21:03:02 UTC (rev 80971)
@@ -2020,19 +2020,18 @@
             array set vinfo $PortInfo(vinfo)
 
             foreach v $value {
-                if {[regexp {([-+])([-A-Za-z0-9_]+)} $v whole val variant]} {
+                if {[regexp {([-+])([-A-Za-z0-9_]+)} $v whole val variant] && ![info exists variations($variant)]} {
                     # Retrieve the information associated with this variant.
                     if {![info exists vinfo($variant)]} {
                         set vinfo($variant) {}
                     }
+                    array unset info
                     array set info $vinfo($variant)
+                    # Set is_default and update vinfo.
+                    set info(is_default) $val
+                    array set vinfo [list $variant [array get info]]
 
-                    if {![info exists variations($variant)]} {
-                        # Set is_default and update vinfo.
-                        array set vinfo [list $variant [list is_default $val]]
-
-                        set variations($variant) $val
-                    }
+                    set variations($variant) $val
                 }
             }
             # Update PortInfo(vinfo).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110722/018b3c80/attachment.html>


More information about the macports-changes mailing list