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

source_changes at macosforge.org source_changes at macosforge.org
Fri Mar 30 09:19:42 PDT 2007


Revision: 23390
          http://trac.macosforge.org/projects/macports/changeset/23390
Author:   jberry at macports.org
Date:     2007-03-30 09:19:42 -0700 (Fri, 30 Mar 2007)

Log Message:
-----------
Fix bugs #11683, #10766.

Present a cleaner message for port installed and port outdated when the list of ports has been restricted. In these cases we now say 'none of the specified ports are outdated/installed' instead of 'no ports are installed/outdated.'

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

Modified: trunk/base/src/port/port.tcl
===================================================================
--- trunk/base/src/port/port.tcl	2007-03-30 15:54:20 UTC (rev 23389)
+++ trunk/base/src/port/port.tcl	2007-03-30 16:19:42 UTC (rev 23390)
@@ -1499,14 +1499,14 @@
 
 proc action_installed { action portlist opts } {
 	set status 0
+	set restrictedList 0
 	set ilist {}
 	if { [llength $portlist] } {
+		set restrictedList 1
 		foreachport $portlist {
 			set composite_version [composite_version $portversion [array get variations]]
 			if { [catch {set ilist [concat $ilist [registry::installed $portname $composite_version]]} result] } {
-				if {[string match "* not registered as installed." $result]} {
-					puts "Port $portname is not installed."
-				} else {
+				if {![string match "* not registered as installed." $result]} {
 					global errorInfo
 					ui_debug "$errorInfo"
 					break_softcontinue "port installed failed: $result" 1 status
@@ -1537,6 +1537,8 @@
 				puts "  $iname @${iversion}_${irevision}${ivariants} (active)"
 			}
 		}
+	} elseif { $restrictedList } {
+		puts "None of the specified ports are installed."
 	} else {
 		puts "No ports are installed."
 	}
@@ -1553,7 +1555,9 @@
 
 	# If port names were supplied, limit ourselves to those port, else check all installed ports
 	set ilist {}
+	set restrictedList 0
 	if { [llength $portlist] } {
+		set restrictedList 1
 		foreach portspec $portlist {
 			array set port $portspec
 			set portname $port(name)
@@ -1655,6 +1659,8 @@
 		if { $num_outdated == 0 } {
 			puts "No installed ports are outdated."
 		}
+	} elseif { $restrictedList } {
+		puts "None of the specified ports are outdated."
 	} else {
 		puts "No ports are installed."
 	}

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


More information about the macports-changes mailing list