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

raimue at macports.org raimue at macports.org
Fri Feb 22 21:45:25 PST 2008


Revision: 34399
          http://trac.macosforge.org/projects/macports/changeset/34399
Author:   raimue at macports.org
Date:     2008-02-22 21:45:25 -0800 (Fri, 22 Feb 2008)

Log Message:
-----------
port/port.tcl:
Print error messages on stderr instead of stdout

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

Modified: trunk/base/src/port/port.tcl
===================================================================
--- trunk/base/src/port/port.tcl	2008-02-23 05:24:51 UTC (rev 34398)
+++ trunk/base/src/port/port.tcl	2008-02-23 05:45:25 UTC (rev 34399)
@@ -51,8 +51,8 @@
         [[portname|pseudo-portname|port-url] [@version] [+-variant]... [option=value]...]...
     }
 
-    puts "Usage: $cmdname$syntax"
-    puts "\"$cmdname help\" or \"man 1 port\" for more information."
+    puts stderr "Usage: $cmdname$syntax"
+    puts stderr "\"$cmdname help\" or \"man 1 port\" for more information."
 }
 
 
@@ -592,7 +592,7 @@
             }
             if {[llength $res] < 2} {
                 if {[macports::ui_isset ports_debug]} {
-                    puts "$portname ($installed_compound is installed; the port was not found in the port index)"
+                    puts stderr "$portname ($installed_compound is installed; the port was not found in the port index)"
                 }
                 continue
             }
@@ -1145,19 +1145,19 @@
 	set topic [lindex $pl [expr $x + 1]]
 	if {[file exists $helpfile]} {
 		if {[catch {source $helpfile} err]} {
-			puts "Error reading helpfile $helpfile: $err"
+			puts stderr "Error reading helpfile $helpfile: $err"
 			return 1
 		} else {
 			if {[info exists porthelp($topic)]} {
-				puts $porthelp($topic)
+				puts stderr $porthelp($topic)
 				return 0
 			} else {
-				puts "No help for topic $topic"
+				puts stderr "No help for topic $topic"
 				return 1
 			}
 		}
 	} else {
-		puts "Unable to open help file $helpfile"
+		puts stderr "Unable to open help file $helpfile"
 		return 1
 	}
     } else {

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


More information about the macports-changes mailing list