[35630] trunk/base/src/macports1.0/macports.tcl

raimue at macports.org raimue at macports.org
Mon Mar 31 15:13:06 PDT 2008


Revision: 35630
          http://trac.macosforge.org/projects/macports/changeset/35630
Author:   raimue at macports.org
Date:     2008-03-31 15:13:05 -0700 (Mon, 31 Mar 2008)

Log Message:
-----------
macports1.0/macports.tcl:
Error out if syncing a source failed, but continue instead of returning an error code

Modified Paths:
--------------
    trunk/base/src/macports1.0/macports.tcl

Modified: trunk/base/src/macports1.0/macports.tcl
===================================================================
--- trunk/base/src/macports1.0/macports.tcl	2008-03-31 21:02:36 UTC (rev 35629)
+++ trunk/base/src/macports1.0/macports.tcl	2008-03-31 22:13:05 UTC (rev 35630)
@@ -1325,6 +1325,8 @@
     global macports::sources macports::portdbpath macports::rsync_options tcl_platform
     global macports::autoconf::rsync_path 
     
+    set numfailed 0
+
     ui_debug "Synchronizing ports tree(s)"
     foreach source $sources {
         set flags [lrange $source 1 end]
@@ -1353,7 +1355,9 @@
                         }]
                     } {
                         ui_debug "$::errorInfo"
-                        return -code error "Synchronization of the local ports tree failed doing an svn update"
+                        ui_error "Synchronization of the local ports tree failed doing an svn update"
+                        incr numfailed
+                        continue
                     }
                 }
             }
@@ -1372,7 +1376,9 @@
                 set rsync_commandline "${macports::autoconf::rsync_path} ${rsync_options} ${source} ${destdir}"
                 ui_debug $rsync_commandline
                 if {[catch {system $rsync_commandline}]} {
-                    return -code error "Synchronization of the local ports tree failed doing rsync"
+                    ui_error "Synchronization of the local ports tree failed doing rsync"
+                    incr numfailed
+                    continue
                 }
                 if {[catch {system "chmod -R a+r \"$destdir\""}]} {
                     ui_warn "Setting world read permissions on parts of the ports tree failed, need root?"
@@ -1388,6 +1394,10 @@
             }
         }
     }
+
+    if {$numfailed > 0} {
+        return -code error "Synchronization of $numfailed source(s) failed"
+    }
 }
 
 # dportsearch

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


More information about the macports-changes mailing list