[26038] trunk/base/src/port/portindex.tcl

source_changes at macosforge.org source_changes at macosforge.org
Sat Jun 9 16:17:26 PDT 2007


Revision: 26038
          http://trac.macosforge.org/projects/macports/changeset/26038
Author:   eridius at macports.org
Date:     2007-06-09 16:17:25 -0700 (Sat, 09 Jun 2007)

Log Message:
-----------
Make portindex use stderr for errors (ticket #11585)

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

Modified: trunk/base/src/port/portindex.tcl
===================================================================
--- trunk/base/src/port/portindex.tcl	2007-06-09 23:13:47 UTC (rev 26037)
+++ trunk/base/src/port/portindex.tcl	2007-06-09 23:17:25 UTC (rev 26038)
@@ -106,7 +106,7 @@
 	set save_prefix $prefix
 	set prefix {\${prefix}}
     if {[catch {set interp [dportopen file://[file join $directory $portdir]]} result]} {
-		puts "Failed to parse file $portdir/Portfile: $result"
+		puts stderr "Failed to parse file $portdir/Portfile: $result"
 		# revert the prefix.
 		set prefix $save_prefix
 		incr stats(failed)
@@ -120,7 +120,7 @@
         if {$archive == "1"} {
             if {![file isdirectory [file join $outdir [file dirname $portdir]]]} {
                 if {[catch {file mkdir [file join $outdir [file dirname $portdir]]} result]} {
-                    puts "$result"
+                    puts stderr "$result"
                     exit 1
                 }
             }
@@ -128,7 +128,7 @@
             cd [file join $directory [file dirname $portinfo(portdir)]]
             puts "Archiving port $portinfo(name) to [file join $outdir $portinfo(portarchive)]"
             if {[catch {exec tar -cf - [file tail $portdir] | gzip -c >[file join $outdir $portinfo(portarchive)]} result]} {
-                puts "Failed to create port archive $portinfo(portarchive): $result"
+                puts stderr "Failed to create port archive $portinfo(portarchive): $result"
                 exit 1
             }
         }
@@ -157,7 +157,7 @@
 		incr i
 		set outdir [lindex $argv $i]
 	    } else {
-		puts "Unknown option: $arg"
+		puts stderr "Unknown option: $arg"
 		print_usage
 		exit 1
 	    }
@@ -167,7 +167,7 @@
 }
 
 if {$archive == 1 && ![info exists outdir]} {
-   puts "You must specify an output directory with -o when using the -a option"
+   puts stderr "You must specify an output directory with -o when using the -a option"
    print_usage
    exit 1
 }
@@ -178,7 +178,7 @@
 
 # cd to input directory 
 if {[catch {cd $directory} result]} {
-    puts "$result"
+    puts stderr "$result"
     exit 1
 } else {
     set directory [pwd]
@@ -187,11 +187,11 @@
 # Set output directory to full path
 if {[info exists outdir]} {
     if {[catch {file mkdir $outdir} result]} {
-        puts "$result"
+        puts stderr "$result"
         exit 1
     }
     if {[catch {cd $outdir} result]} {
-        puts "$result"
+        puts stderr "$result"
         exit 1
     } else {
         set outdir [pwd]

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


More information about the macports-changes mailing list