[47806] trunk/base/src/macports1.0/macports.tcl

perry at macports.org perry at macports.org
Fri Mar 6 15:39:48 PST 2009


Revision: 47806
          http://trac.macports.org/changeset/47806
Author:   perry at macports.org
Date:     2009-03-06 15:39:48 -0800 (Fri, 06 Mar 2009)
Log Message:
-----------
macports1.0/macports.tcl:
Don't use variant_descriptions.conf to determine whether a variant is
implicit.

Modified Paths:
--------------
    trunk/base/src/macports1.0/macports.tcl

Modified: trunk/base/src/macports1.0/macports.tcl
===================================================================
--- trunk/base/src/macports1.0/macports.tcl	2009-03-06 22:52:20 UTC (rev 47805)
+++ trunk/base/src/macports1.0/macports.tcl	2009-03-06 23:39:48 UTC (rev 47806)
@@ -1054,39 +1054,27 @@
         return -code error "Could not find Portfile in $portpath"
     }
 
-    # Filter out explicitly set/unset implicit variants.
-    array set isimplicit {}
+    # Iterate through the explicitly set/unset variants, filtering out
+    # implicit variants. At the moment, the only implicit variants are
+    # platform variants.
+    set filteredvariations {}
 
-    # Use the global descriptions file to determine whether a variant is implicit.
-    set descfile [macports::getportresourcepath $porturl "port1.0/variant_descriptions.conf"]
-    if {[file exists $descfile] && ![catch {set fd [open $descfile r]}]} {
-        set i 0
-        while {[gets $fd line] >= 0} {
-            set name [lindex $line 0]
-            set desc [lindex $line 1]
-
-            if {[regexp {^(Platform variant)} $desc]} {
-                set isimplicit($name) 1
+    foreach {variation value} $variations {
+        switch -regexp $variation {
+            ^(pure)?darwin         -
+            ^(free|net|open){1}bsd -
+            ^i386                  -
+            ^linux                 -
+            ^macosx                -
+            ^powerpc               -
+            ^solaris               -
+            ^sunos {
+                ui_debug "Implicit variants should not be explicitly set or unset. $variation will be ignored."
             }
-            incr i
-        }
-        close $fd
-
-        # Iterate through the explicitly set/unset variants, filtering out
-        # implicit variants.
-        set filteredvariations {}
-        foreach {variation value} $variations {
-            if {[info exists isimplicit($variation)]} {
-                ui_debug [concat "Implicit variants should not be explicitly" \
-                                 "set or unset. $variation will be ignored."]
-            } else {
+            default {
                 lappend filteredvariations $variation $value
             }
         }
-    } else {
-        # If the global descriptions file cannot be read, use the unfiltered
-        # list of variants.
-        set filteredvariations $variations
     }
 
     set workername [interp create]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090306/7f233a09/attachment.html>


More information about the macports-changes mailing list