[25203] trunk/base/src/port/port.tcl

source_changes at macosforge.org source_changes at macosforge.org
Tue May 15 16:33:02 PDT 2007


Revision: 25203
          http://trac.macosforge.org/projects/macports/changeset/25203
Author:   jberry at macports.org
Date:     2007-05-15 16:33:02 -0700 (Tue, 15 May 2007)

Log Message:
-----------
Remove variant descriptions from port info, moving them to port variants

Modified Paths:
--------------
    trunk/base/src/port/port.tcl

Modified: trunk/base/src/port/port.tcl
===================================================================
--- trunk/base/src/port/port.tcl	2007-05-15 23:11:05 UTC (rev 25202)
+++ trunk/base/src/port/port.tcl	2007-05-15 23:33:02 UTC (rev 25203)
@@ -1239,26 +1239,16 @@
 				if {[info exists portinfo(revision)] && $portinfo(revision) > 0} { 
 					puts -nonewline ", Revision $portinfo(revision)" 
 				}
-				puts ", $portinfo(portdir)" 
-				
+				puts -nonewline ", $portinfo(portdir)" 
 				if {[info exists portinfo(variants)]} {
-					if {[info exists portinfo(variant_desc)]} {
-						array set descs $portinfo(variant_desc)
-					} else {
-						array set descs ""
-					}
-					puts "Variants:"
+					puts -nonewline " (Variants: "
 					for {set i 0} {$i < [llength $portinfo(variants)]} {incr i} {
-						set v [lindex $portinfo(variants) $i]
-						if {[info exists descs($v)]} {
-							puts " - $v: $descs($v)"
-						} else {
-							puts " - $v"
-						}
+						if {$i > 0} { puts -nonewline ", " }
+						puts -nonewline "[lindex $portinfo(variants) $i]"
 					}
+					puts -nonewline ")"
 				}
 				puts ""
-				
 				if {[info exists portinfo(homepage)]} { 
 					puts "$portinfo(homepage)"
 				}
@@ -1768,10 +1758,21 @@
 		if {![info exists portinfo(variants)]} {
 			puts "$portname has no variants"
 		} else {
+			# Get the variant descriptions
+			if {[info exists portinfo(variant_desc)]} {
+				array set descs $portinfo(variant_desc)
+			} else {
+				array set descs ""
+			}
+
 			# print out all the variants
 			puts "$portname has the variants:"
-			for {set i 0} {$i < [llength $portinfo(variants)]} {incr i} {
-				puts "\t[lindex $portinfo(variants) $i]"
+			foreach v $portinfo(variants) {
+				if {[info exists descs($v)]} {
+					puts "\t$v: $descs($v)"
+				} else {
+					puts "\t$v"
+				}
 			}
 		}
 	}

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070515/9aad2fbc/attachment.html


More information about the macports-changes mailing list