<pre style='margin:0'>
Rainer Müller (raimue) pushed a commit to branch release-2.3
in repository macports-base.
</pre>
<p><a href="https://github.com/macports/macports-base/commit/8d65470e52b624303cf01a708fdaaac84b65eb61">https://github.com/macports/macports-base/commit/8d65470e52b624303cf01a708fdaaac84b65eb61</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/release-2.3 by this push:
<span style='display:block; white-space:pre;color:#404040;'> new 8d65470 Remove svn.macports.org as fallback for distfiles
</span>8d65470 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 8d65470e52b624303cf01a708fdaaac84b65eb61
</span>Author: Rainer Müller <raimue@macports.org>
AuthorDate: Sun Nov 13 14:15:17 2016 +0100
<span style='display:block; white-space:pre;color:#404040;'> Remove svn.macports.org as fallback for distfiles
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> If a port really needs to use this, this can still be specified
</span><span style='display:block; white-space:pre;color:#404040;'> explicitly with `master_sites macports`.
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Closes: https://trac.macports.org/ticket/52626
</span><span style='display:block; white-space:pre;color:#404040;'> Closes: #5
</span><span style='display:block; white-space:pre;color:#404040;'> (cherry picked from commit da038b881b74ee5c57a44f24ec949228a022d2c2)
</span>---
src/package1.0/portarchivefetch.tcl | 2 +-
src/port1.0/fetch_common.tcl | 31 +++++++++----------------------
src/port1.0/portfetch.tcl | 11 +++++------
3 files changed, 15 insertions(+), 29 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/package1.0/portarchivefetch.tcl b/src/package1.0/portarchivefetch.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index 2f6e11d..798246b 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/package1.0/portarchivefetch.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/package1.0/portarchivefetch.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -209,7 +209,7 @@ proc portarchivefetch::fetchfiles {args} {
</span> return -code error [format [msgcat::mc "%s must be writable"] $incoming_path]
}
if {!$sorted} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- portfetch::sortsites archivefetch_urls {} archive_sites
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ portfetch::sortsites archivefetch_urls archive_sites
</span> set sorted yes
}
if {![info exists urlmap($url_var)]} {
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/port1.0/fetch_common.tcl b/src/port1.0/fetch_common.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index 3c65f53..1e74d74 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/port1.0/fetch_common.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/port1.0/fetch_common.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -84,15 +84,14 @@ proc portfetch::assemble_url {site distfile} {
</span> # For a given mirror site type, e.g. "gnu" or "x11", check to see if there's a
# pre-registered set of sites, and if so, return them.
proc portfetch::mirror_sites {mirrors tag subdir mirrorfile} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global UI_PREFIX name dist_subdir \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- global_mirror_site fallback_mirror_site
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global UI_PREFIX name dist_subdir global_mirror_site
</span>
if {[file exists $mirrorfile]} {
source $mirrorfile
}
if {![info exists portfetch::mirror_sites::sites($mirrors)]} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {$mirrors != $global_mirror_site && $mirrors != $fallback_mirror_site} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {$mirrors != $global_mirror_site} {
</span> ui_warn "[format [msgcat::mc "No mirror sites on file for class %s"] $mirrors]"
}
return {}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -162,10 +161,10 @@ proc portfetch::checksites {sitelists mirrorfile} {
</span> continue
}
global ${listname}.mirror_subdir
<span style='display:block; white-space:pre;background:#ffe0e0;'>- # add the specified global, fallback and user-defined mirrors
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set sglobal [lindex $extras 0]; set sfallback [lindex $extras 1]; set senv [lindex $extras 2]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # add the specified global and user-defined mirrors
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set sglobal [lindex $extras 0]; set senv [lindex $extras 1]
</span> set full_list [set $listname]
<span style='display:block; white-space:pre;background:#ffe0e0;'>- append full_list " $sglobal $sfallback"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ append full_list " $sglobal"
</span> if {[info exists env($senv)]} {
set full_list [concat $env($senv) $full_list]
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -189,15 +188,12 @@ proc portfetch::checksites {sitelists mirrorfile} {
</span> }
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- # add in the global, fallback and user-defined mirrors for each tag
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # add in the global and user-defined mirrors for each tag
</span> foreach site $site_list {
if {[regexp {([a-zA-Z]+://.+/?):([0-9A-Za-z_-]+)$} $site match site tag] && ![info exists extras_added($tag)]} {
if {$sglobal ne ""} {
set site_list [concat $site_list [mirror_sites $sglobal $tag "" $mirrorfile]]
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {$sfallback ne ""} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set site_list [concat $site_list [mirror_sites $sfallback $tag "" $mirrorfile]]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span> if {[info exists env($senv)]} {
set site_list [concat [list $env($senv)] $site_list]
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -216,7 +212,7 @@ proc portfetch::checksites {sitelists mirrorfile} {
</span> }
# sorts fetch_urls in order of ping time
<span style='display:block; white-space:pre;background:#ffe0e0;'>-proc portfetch::sortsites {urls fallback_mirror_list default_listvar} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+proc portfetch::sortsites {urls default_listvar} {
</span> global $default_listvar
upvar $urls fetch_urls
variable urlmap
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -234,7 +230,7 @@ proc portfetch::sortsites {urls fallback_mirror_list default_listvar} {
</span> set hosts {}
set hostregex {[a-zA-Z]+://([a-zA-Z0-9\.\-_]+)}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[llength $urllist] - [llength $fallback_mirror_list] <= 1} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[llength $urllist] <= 1} {
</span> # there is only one mirror, no need to ping or sort
continue
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -257,15 +253,6 @@ proc portfetch::sortsites {urls fallback_mirror_list default_listvar} {
</span> if { [info exists seen($host)] } {
continue
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- foreach fallback $fallback_mirror_list {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[string match ${fallback}* $site]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # don't bother pinging fallback mirrors
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set seen($host) yes
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # and make them sort to the very end of the list
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set pingtimes($host) 20000
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- break
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span> if { ![info exists seen($host)] } {
# first check the persistent cache
set pingtimes($host) [get_pingtime $host]
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -285,7 +272,7 @@ proc portfetch::sortsites {urls fallback_mirror_list default_listvar} {
</span> foreach host $hosts {
gets $fds($host) pingtimes($host)
if { [catch { close $fds($host) }] || ![string is double -strict $pingtimes($host)] } {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- # ping failed, so put it last in the list (but before the fallback mirrors)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # ping failed, so put it last in the list
</span> set pingtimes($host) 10000
}
# cache it
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/port1.0/portfetch.tcl b/src/port1.0/portfetch.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index 83c8262..243ba87 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/port1.0/portfetch.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/port1.0/portfetch.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -117,7 +117,6 @@ default fetch.ignore_sslcert "no"
</span> # Use remote timestamps
default fetch.remote_time "no"
<span style='display:block; white-space:pre;background:#ffe0e0;'>-default fallback_mirror_site "macports"
</span> default global_mirror_site "macports_distfiles"
default mirror_sites.listfile {"mirror_sites.tcl"}
default mirror_sites.listpath {"port1.0/fetch"}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -272,11 +271,11 @@ proc portfetch::get_full_mirror_sites_path {} {
</span> # Perform the full checksites/checkpatchfiles/checkdistfiles sequence.
# This method is used by distcheck target.
proc portfetch::checkfiles {urls} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global global_mirror_site fallback_mirror_site
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global global_mirror_site
</span> upvar $urls fetch_urls
<span style='display:block; white-space:pre;background:#ffe0e0;'>- checksites [list patch_sites [list $global_mirror_site $fallback_mirror_site PATCH_SITE_LOCAL] \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- master_sites [list $global_mirror_site $fallback_mirror_site MASTER_SITE_LOCAL]] \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ checksites [list patch_sites [list $global_mirror_site PATCH_SITE_LOCAL] \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ master_sites [list $global_mirror_site MASTER_SITE_LOCAL]] \
</span> [get_full_mirror_sites_path]
checkpatchfiles fetch_urls
checkdistfiles fetch_urls
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -483,7 +482,7 @@ proc portfetch::hgfetch {args} {
</span> proc portfetch::fetchfiles {args} {
global distpath all_dist_files UI_PREFIX \
fetch.user fetch.password fetch.use_epsv fetch.ignore_sslcert fetch.remote_time \
<span style='display:block; white-space:pre;background:#ffe0e0;'>- fallback_mirror_site portverbose usealtworkpath altprefix
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ portverbose usealtworkpath altprefix
</span> variable fetch_urls
variable urlmap
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -525,7 +524,7 @@ proc portfetch::fetchfiles {args} {
</span> continue
}
if {!$sorted} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- sortsites fetch_urls [mirror_sites $fallback_mirror_site {} {} [get_full_mirror_sites_path]] master_sites
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sortsites fetch_urls master_sites
</span> set sorted yes
}
if {![info exists urlmap($url_var)]} {
</pre><pre style='margin:0'>
</pre>