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

source_changes at macosforge.org source_changes at macosforge.org
Wed Aug 15 21:07:18 PDT 2007


Revision: 27919
          http://trac.macosforge.org/projects/macports/changeset/27919
Author:   eridius at macports.org
Date:     2007-08-15 21:07:17 -0700 (Wed, 15 Aug 2007)

Log Message:
-----------
port variants now reads the Portfile just like port info. Also supports the --index flag

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

Modified: trunk/base/src/port/port.tcl
===================================================================
--- trunk/base/src/port/port.tcl	2007-08-16 04:03:18 UTC (rev 27918)
+++ trunk/base/src/port/port.tcl	2007-08-16 04:07:17 UTC (rev 27919)
@@ -1781,6 +1781,24 @@
 	
 		array unset portinfo
 		array set portinfo [lindex $result 1]
+		set porturl $portinfo(porturl)
+		set portdir $portinfo(portdir)
+
+		if {!([info exists options(ports_variants_index)] && $options(ports_variants_index) eq "yes")} {
+			if {[catch {set mport [mportopen $porturl [array get options] [array get variations]]} result]} {
+				ui_debug "$::errorInfo"
+				break_softcontinue "Unable to open port: $result" 1 status
+			}
+			array unset portinfo
+			array set portinfo [mportinfo $mport]
+			mportclose $mport
+			if {[info exists portdir]} {
+				set portinfo(portdir) $portdir
+			}
+		} elseif {![info exists portinfo]} {
+			ui_warn "port variants --index does not work with 'current' pseudo-port"
+			continue
+		}
 	
 		# if this fails the port doesn't have any variants
 		if {![info exists portinfo(variants)]} {

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


More information about the macports-changes mailing list