[43899] trunk/base/src/port/port.tcl
perry at macports.org
perry at macports.org
Tue Dec 16 15:15:30 PST 2008
Revision: 43899
http://trac.macports.org/changeset/43899
Author: perry at macports.org
Date: 2008-12-16 15:15:29 -0800 (Tue, 16 Dec 2008)
Log Message:
-----------
port/port.tcl - `port info --index` no longer dies if _variants doesn't exist.
Modified Paths:
--------------
trunk/base/src/port/port.tcl
Modified: trunk/base/src/port/port.tcl
===================================================================
--- trunk/base/src/port/port.tcl 2008-12-16 21:59:58 UTC (rev 43898)
+++ trunk/base/src/port/port.tcl 2008-12-16 23:15:29 UTC (rev 43899)
@@ -1493,15 +1493,16 @@
if {[info exists portinfo(variants)]} {
global global_variations
- # Get the variants associated with this Portfile.
- array set variants $portinfo(_variants)
+ # Only use the new key for variants if it exists in PortInfo.
+ # Note that this key does not currently exist outside of trunk.
+ array unset variants
+ if {[info exists portinfo(_variants)]} {
+ array set variants $portinfo(_variants)
+ }
set joiner ""
set vars ""
foreach v [lsort $portinfo(variants)] {
- # Get the variant's information.
- array set variant $variants($v)
-
set mod ""
if {[info exists variations($v)]} {
# selected by command line, prefixed with +/-
@@ -1509,8 +1510,13 @@
} elseif {[info exists global_variations($v)]} {
# selected by variants.conf, prefixed with (+)/(-)
set mod "($global_variations($v))"
- } elseif {$variant(is_default) == "+"} {
- set mod "\[+\]"
+ # Retrieve additional information from the new key.
+ } elseif {[info exists variants]} {
+ array unset variant
+ array set variant $variants($v)
+ if {$variant(is_default) eq "+"} {
+ set mod "\[+\]"
+ }
}
append vars "$joiner$mod$v"
set joiner ", "
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20081216/03cc0a7b/attachment.html>
More information about the macports-changes
mailing list