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

source_changes at macosforge.org source_changes at macosforge.org
Fri Sep 22 09:01:18 PDT 2006


Revision: 19665
          http://trac.macosforge.org/projects/macports/changeset/19665
Author:   jberry at macports.org
Date:     2006-09-22 09:01:18 -0700 (Fri, 22 Sep 2006)

Log Message:
-----------
Resolve #10766, sortof. Improve error when no current port is available.
We should have better handling of the empty-portlist situation, but it's somewhat hard because we need semaphore for empty list, since tcl has no concept of null. That larger fix will have to wait til some future date.

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

Modified: trunk/base/src/port/port.tcl
===================================================================
--- trunk/base/src/port/port.tcl	2006-09-22 15:40:31 UTC (rev 19664)
+++ trunk/base/src/port/port.tcl	2006-09-22 16:01:18 UTC (rev 19665)
@@ -367,7 +367,8 @@
 	set portname ""
 	if {[catch {set ctx [dportopen $url]} result]} {
 		if {!$quiet} {
-			puts stderr "Can't map the URL '$url' to a port description file (${result}). Please verify that the directory and portfile syntax are correct."
+			ui_msg "Can't map the URL '$url' to a port description file (\"${result}\")."
+			ui_msg "Please verify that the directory and portfile syntax are correct."
 		}
 	} else {
 		array set portinfo [dportinfo $ctx]
@@ -483,7 +484,9 @@
 	set url file://.
 	set portname [url_to_portname $url]
 	if {$portname == ""} {
-		ui_error "To use the current port, you must be in a port's directory"
+		ui_msg "To use the current port, you must be in a port's directory."
+		ui_msg "(you might also see this message if a pseudo-port such as"
+		ui_msg "outdated or installed expands to no ports)."
 	}
 	
 	set results {}

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


More information about the macports-changes mailing list