[101311] trunk/base/src/package1.0/portarchivefetch.tcl

jmr at macports.org jmr at macports.org
Tue Jan 8 07:53:23 PST 2013


Revision: 101311
          https://trac.macports.org/changeset/101311
Author:   jmr at macports.org
Date:     2013-01-08 07:53:22 -0800 (Tue, 08 Jan 2013)
Log Message:
-----------
limit the number of archive fetch attempts unless it's known to be present on the master mirror (or ports_binary_only is set)

Modified Paths:
--------------
    trunk/base/src/package1.0/portarchivefetch.tcl

Modified: trunk/base/src/package1.0/portarchivefetch.tcl
===================================================================
--- trunk/base/src/package1.0/portarchivefetch.tcl	2013-01-08 14:22:09 UTC (rev 101310)
+++ trunk/base/src/package1.0/portarchivefetch.tcl	2013-01-08 15:53:22 UTC (rev 101311)
@@ -209,6 +209,7 @@
                 ui_error [format [msgcat::mc "No defined site for tag: %s, using archive_sites"] $url_var]
                 set urlmap($url_var) $urlmap(archive_sites)
             }
+            set failed_sites 0
             unset -nocomplain fetched
             foreach site $urlmap($url_var) {
                 if {[string index $site end] != "/"} {
@@ -226,6 +227,10 @@
                 } else {
                     ui_debug "[msgcat::mc "Fetching archive failed:"]: $result"
                     file delete -force "${incoming_path}/${archive}.TMP"
+                    incr failed_sites
+                    if {$failed_sites > 2 && ![tbool ports_binary_only] && ![_archive_available]} {
+                        break
+                    }
                 }
             }
             if {[info exists fetched]} {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130108/534c10bf/attachment.html>


More information about the macports-changes mailing list