Index: src/port/port.tcl
===================================================================
--- src/port/port.tcl	(revision 25303)
+++ src/port/port.tcl	(working copy)
@@ -1131,21 +1131,23 @@
 	return 0
 }
 
-
-proc action_info { action portlist opts } {
-    set status 0
-    require_portlist portlist
-    foreachport $portlist {
+# Helper for info and deps actions, which should both get the "true" port 
+# info found by opening the port and thereby evaluating the variants
+proc obtain_port_info { porturl portname onlyindex varname} {
+        upvar $varname variations
+        global global_variations
         # If we have a url, use that, since it's most specific
         # otherwise try to map the portname to a url
         if {$porturl eq ""} {
             # Verify the portname, getting portinfo to map to a porturl
             if {[catch {dportsearch $portname no exact} result]} {
                 ui_debug "$::errorInfo"
-                break_softcontinue "search for portname $portname failed: $result" 1 status
+		set portinfo(SignalError) "search for portname $portname failed: $result"
+		return [array get portinfo]
             }
             if {[llength $result] < 2} {
-                break_softcontinue "Port $portname not found" 1 status
+		set portinfo(SignalError) "Port $portname not found"
+                return [array get portinfo] 
             }
             set found [expr [llength $result] / 2]
             if {$found > 1} {
@@ -1156,11 +1158,20 @@
             set porturl $portinfo(porturl)
             set portdir $portinfo(portdir)
         }
-        
-        if {!([info exists options(ports_info_index)] && $options(ports_info_index) eq "yes")} {
+
+	# Add any global_variations to the variations 
+        # specified for the port
+	foreach { variation value } [array get global_variations] {
+		if { ![info exists variations($variation)] } {
+		        set variations($variation) $value
+		}
+	}
+
+	if {$onlyindex != "yes"} {
             if {[catch {set dport [dportopen $porturl [array get options] [array get variations]]} result]} {
                 ui_debug "$::errorInfo"
-                break_softcontinue "Unable to open port: $result" 1 status
+		set portinfo(SignalError) "Unable to open port: $result"
+                return [array get portinfo]
             }
             array unset portinfo
             array set portinfo [dportinfo $dport]
@@ -1172,7 +1183,21 @@
             ui_warn "port info --index does not work with 'current' pseudo-port"
             continue
         }
-        
+	return [array get portinfo]
+}
+
+proc action_info { action portlist opts } {
+    set status 0
+    require_portlist portlist
+    foreachport $portlist {
+	if {![info exists options(ports_info_index)]} {
+	    set options(ports_info_index) "no"
+	}
+        array unset portinfo
+        array set portinfo [obtain_port_info $porturl $portname $options(ports_info_index) variations]
+	if {[info exists portinfo(SignalError)]} {
+	    break_softcontinue $portinfo(SignalError) 1 status
+	 }
         # Map from friendly to less-friendly but real names
         array set name_map "
                 category        categories
@@ -1258,6 +1283,9 @@
         
             # If we weren't asked to show any specific fields, then show general information
             puts -nonewline "$portinfo(name) $portinfo(version)"
+	    if {[info exists portinfo(portvariants)]} {
+		puts -nonewline "$portinfo(portvariants)"
+            }
             if {[info exists portinfo(revision)] && $portinfo(revision) > 0} { 
                 puts -nonewline ", Revision $portinfo(revision)" 
             }
@@ -1698,31 +1726,31 @@
 
 
 proc action_deps { action portlist opts } {
+        global variations global_variations
 	set status 0
 	require_portlist portlist
 	foreachport $portlist {
-		# Get info about the port
-		if {[catch {dportsearch $portname no exact} result]} {
-			global errorInfo
-			ui_debug "$errorInfo"
-			break_softcontinue "search for portname $portname failed: $result" 1 status
+	        if {![info exists options(ports_deps_index)]} {
+		    set options(ports_deps_index) "no"
 		}
-
-		if {$result == ""} {
-			break_softcontinue "No port $portname found." 1 status
-		}
-
 		array unset portinfo
-		array set portinfo [lindex $result 1]
-
+		array set portinfo [obtain_port_info $porturl $portname $options(ports_deps_index) variations]
+		if {[info exists portinfo(SignalError)]} {
+			break_softcontinue $portinfo(SignalError) 1 status
+                }
 		set depstypes {depends_build depends_lib depends_run}
 		set depstypes_descr {"build" "library" "runtime"}
 
+		if {[info exists portinfo(portvariants)]} {
+			set fullportname "$portname $portinfo(portvariants)"
+		} else {
+			set fullportname $portname
+		}
 		set nodeps true
 		foreach depstype $depstypes depsdecr $depstypes_descr {
 			if {[info exists portinfo($depstype)] &&
 				$portinfo($depstype) != ""} {
-				puts "$portname has $depsdecr dependencies on:"
+				puts "$fullportname has $depsdecr dependencies on:"
 				foreach i $portinfo($depstype) {
 					puts "\t[lindex [split [lindex $i 0] :] end]"
 				}
@@ -1732,7 +1760,7 @@
 		
 		# no dependencies found
 		if {$nodeps == "true"} {
-			puts "$portname has no dependencies"
+			puts "$fullportname has no dependencies"
 		}
 	}
 	
Index: src/darwinports1.0/darwinports.tcl
===================================================================
--- src/darwinports1.0/darwinports.tcl	(revision 25303)
+++ src/darwinports1.0/darwinports.tcl	(working copy)
@@ -1354,7 +1354,11 @@
 
 proc dportinfo {dport} {
 	set workername [ditem_key $dport workername]
-    return [$workername eval array get PortInfo]
+	array set pinfo [$workername eval array get PortInfo] 
+	if {[$workername eval info exists portvariants]} {
+		set pinfo(portvariants) [$workername eval return \$portvariants]
+	}
+	return [array get pinfo]
 }
 
 proc dportclose {dport} {
Index: src/port1.0/portutil.tcl
===================================================================
--- src/port1.0/portutil.tcl	(revision 25303)
+++ src/port1.0/portutil.tcl	(working copy)
@@ -1373,6 +1373,7 @@
 }
 
 proc variant_run {ditem} {
+    global PortInfo
     set name [ditem_key $ditem name]
     ui_debug "Executing variant $name provides [ditem_key $ditem provides]"
     
@@ -1391,6 +1392,19 @@
 	ui_error "Error executing $name: $result"
 	return 1
     }
+    # Update the long description to show that the variant is active
+    if {[string first [option os.platform] $name] != 0
+           && $name != [option os.arch]
+	   && [info exists PortInfo(long_description)]} {
+        set terminator "."
+	if {[info exists PortInfo(variant_desc)]} {
+	    array set descs $PortInfo(variant_desc)
+	    if {[info exists descs($name)]} {
+		set terminator ": $descs($name)\n"
+	    }
+	}
+	set PortInfo(long_description) [concat $PortInfo(long_description) "\n(+$name active$terminator)\n"]
+    }
     return 0
 }
 

