Index: src/macports1.0/macports.tcl
===================================================================
--- src/macports1.0/macports.tcl	(revision 117606)
+++ src/macports1.0/macports.tcl	(working copy)
@@ -4192,12 +4192,12 @@
 }
 
 # mportselect
-#   * command: The only valid commands are list, set and show
+#   * command: The only valid commands are list, set, show and summary
 #   * group: This argument should correspond to a directory under
 #            ${macports::prefix}/etc/select.
 #   * version: This argument is only used by the 'set' command.
 # On error mportselect returns with the code 'error'.
-proc mportselect {command group {version {}}} {
+proc mportselect {command {group ""} {version {}}} {
     ui_debug "mportselect \[$command] \[$group] \[$version]"
 
     set conf_path ${macports::prefix}/etc/select/$group
@@ -4226,6 +4226,16 @@
             }
             return [lsort $lversions]
         }
+        summary {
+            # Return the list of portgroups in ${macports::prefix}/etc/select
+            if {[catch {set lportgroups [glob -directory $conf_path -tails *]} result]} {
+                global errorInfo
+                ui_debug "${result}: $errorInfo"
+                return -code error [concat "No ports with the select" \
+                                           "option were found."]
+            }
+            return [lsort $lportgroups]
+        }
         set {
             # Use ${conf_path}/$version to read in sources.
             if {$version eq {} || $version eq {base} || $version eq {current}
Index: src/port/port.tcl
===================================================================
--- src/port/port.tcl	(revision 117606)
+++ src/port/port.tcl	(working copy)
@@ -463,7 +463,7 @@
 
 # Execute the enclosed block once for every element in the portlist
 # When the block is entered, the following variables will have been set:
-#	portspec, porturl, portname, portversion, options, variations, requested_variations
+#   portspec, porturl, portname, portversion, options, variations, requested_variations
 proc foreachport {portlist block} {
     set savedir [pwd]
     foreach portspec $portlist {
@@ -2504,18 +2504,20 @@
 proc action_select { action portlist opts } {
     ui_debug "action_select \[$portlist] \[$opts]..."
 
-    # Error out if no group is specified.
-    if {[llength $portlist] < 1} {
-        ui_error "port select \[--list|--set|--show] <group> \[<version>]"
+    array set opts_array $opts
+    set commands [array names opts_array ports_select_*]
+    array unset opts_array
+
+    # Error out if no group is specified or command is not --summary.
+    if {[llength $portlist] < 1 && [string map {ports_select_ ""} [lindex $commands 0]] != "summary"} {
+        ui_error "port select \[--list|--set|--show|--summary] \<group> \[<version>]"
         return 1
     }
+
     set group [lindex $portlist 0]
-
-    array set opts_array $opts
-    set commands [array names opts_array ports_select_*]
-    array unset opts_array
-    # If no command (--set, --show, --list) is specified *but* more than one
-    # argument is specified, default to the set command.
+    
+    # If no command (--set, --show, --list, --summary) is specified *but*
+    #  more than one argument is specified, default to the set command.
     if {[llength $commands] < 1 && [llength $portlist] > 1} {
         set command set
         ui_debug [concat "Although no command was specified, more than " \
@@ -2601,6 +2603,38 @@
                          "'$selected_version'."]
             return 0
         }
+        summary {
+            if {[llength $portlist] > 0} {
+                ui_warn [concat "The 'summary' command does not expect any " \
+                                "arguments. Extra arguments will be ignored."]
+            }
+
+            if {[catch {mportselect $command} portgroups]} {
+                ui_error "The 'summary' command failed: $portgroups"
+                return 1
+            }
+            puts "Portgroups\tOptions" 
+            foreach pg $portgroups {
+                ui_notice $pg
+                if {[catch {mportselect list $pg} versions]} {
+                    ui_error "The list of versions could not be obtained: $versions"
+                    return 1
+                }
+                foreach v $versions {
+                    ui_notice -nonewline "\t"
+                        if {[catch {mportselect show $pg} selected_version]} {
+                            ui_error "The 'show' command failed: $selected_version"
+                            return 1
+                        }
+                    if {$selected_version == $v} {
+                        ui_msg "$v (active)"
+                    } else {
+                        ui_msg "$v"
+                    }
+                }
+                return 0
+            }
+        }
         default {
             ui_error "An unknown command '$command' was specified."
             return 1
@@ -4294,7 +4328,7 @@
     clean       {all archive dist work logs}
     mirror      {new}
     lint        {nitpick}
-    select      {list set show}
+    select      {list set show summary}
     log         {{phase 1} {level 1}}
     upgrade     {force enforce-variants no-replace no-rev-upgrade}
     rev-upgrade {id-loadcmd-check}
