aboutsummaryrefslogtreecommitdiff
path: root/ports-mgmt/fastest_sites
diff options
context:
space:
mode:
authorWesley Shields <wxs@FreeBSD.org>2008-11-07 20:44:48 +0000
committerWesley Shields <wxs@FreeBSD.org>2008-11-07 20:44:48 +0000
commitfc5805c46b3bbbdf9ffb68cf99d69812c55a6d2b (patch)
treea6ae695764cfe48ff0047518b925aa15967f8b73 /ports-mgmt/fastest_sites
parent69d100db8c7960f65446d78d727dfc2e05355533 (diff)
downloadports-fc5805c46b3bbbdf9ffb68cf99d69812c55a6d2b.tar.gz
ports-fc5805c46b3bbbdf9ffb68cf99d69812c55a6d2b.zip
Notes
Diffstat (limited to 'ports-mgmt/fastest_sites')
-rw-r--r--ports-mgmt/fastest_sites/Makefile6
-rw-r--r--ports-mgmt/fastest_sites/distinfo6
-rw-r--r--ports-mgmt/fastest_sites/files/patch-fastest_sites.py57
3 files changed, 5 insertions, 64 deletions
diff --git a/ports-mgmt/fastest_sites/Makefile b/ports-mgmt/fastest_sites/Makefile
index f26a1c44efe7..5c717d3a28fd 100644
--- a/ports-mgmt/fastest_sites/Makefile
+++ b/ports-mgmt/fastest_sites/Makefile
@@ -6,11 +6,9 @@
#
PORTNAME= fastest_sites
-PORTVERSION= 20080320
-PORTREVISION= 1
+PORTVERSION= 20081104
CATEGORIES= ports-mgmt
-MASTER_SITES= http://www.semicomplete.com/files/fastest_sites/ \
- http://www.atarininja.org/~wxs/distfiles/
+MASTER_SITES= http://www.semicomplete.com/files/fastest_sites/
DISTNAME= ${PORTNAME}-${PORTVERSION}.py
EXTRACT_SUFX= # nada
diff --git a/ports-mgmt/fastest_sites/distinfo b/ports-mgmt/fastest_sites/distinfo
index 6dc26eab6322..68984c6f5075 100644
--- a/ports-mgmt/fastest_sites/distinfo
+++ b/ports-mgmt/fastest_sites/distinfo
@@ -1,3 +1,3 @@
-MD5 (fastest_sites-20080320.py) = 078324a2ed2f0edf627defeaeb9c39cf
-SHA256 (fastest_sites-20080320.py) = d4e5440c1ea9aa3af094c8d5765e6e978cd6ea11c2724a5f0035d7ca3579d5d0
-SIZE (fastest_sites-20080320.py) = 4159
+MD5 (fastest_sites-20081104.py) = 040b582c974ece826297e97bef15ead2
+SHA256 (fastest_sites-20081104.py) = 7759b8f048dfcda0107fbd3e072fcf1c039136774b7f0835ccdc97fb93dbe74b
+SIZE (fastest_sites-20081104.py) = 5008
diff --git a/ports-mgmt/fastest_sites/files/patch-fastest_sites.py b/ports-mgmt/fastest_sites/files/patch-fastest_sites.py
deleted file mode 100644
index d5df2ae3494a..000000000000
--- a/ports-mgmt/fastest_sites/files/patch-fastest_sites.py
+++ /dev/null
@@ -1,57 +0,0 @@
---- fastest_sites-20080320.py.orig 2008-09-01 20:34:56.000000000 -0400
-+++ fastest_sites-20080320.py 2008-09-02 22:20:46.000000000 -0400
-@@ -129,15 +129,29 @@
- var_re = re.compile(r"^(MASTER_SITE_[A-Z_]+)\+?=")
- sites_mk = "%s/Mk/bsd.sites.mk" % (GetVariable("PORTSDIR"))
- sites = {}
-+bad_sites = {}
- site_latency = {}
-
-+# This catches http://.foo (as is the case with MASTER_SITE_GOOGLE_CODE)
-+# and foo.com// (as is the case with MASTER_SITE_DEBIAN_POOL)
-+# It also catches http://www..com just in case that pops up in the future
-+bad_site_regex = re.compile(r"(\/\/\.|\.\.|[a-zA-Z]\/\/)")
-+
- fd = open(sites_mk, "r")
- for line in fd:
- match = var_re.search(line)
- if match:
- varname = match.group(1)
- output = Run("make -V %s -f %s" % (varname, sites_mk))
-- sites[varname] = output.split()
-+ # Some sites uses variables in them:
-+ # MASTER_SITE_GOOGLE_CODE: http://${PORTNAME}.googlecode.com/files/
-+ # and MASTER_SITE_DEBIAN_POOL
-+ # We don't have access to those variables so we skip them.
-+ site_is_bad = bad_site_regex.search(output)
-+ if site_is_bad:
-+ bad_sites[varname] = output.split()
-+ else:
-+ sites[varname] = output.split()
-
- for (varname, sitelist) in sites.iteritems():
- if len(sys.argv) > 1 and varname not in sys.argv[1:]:
-@@ -146,12 +160,22 @@
- " => Checking servers for %s (%d servers)" % (varname, len(sitelist))
- latency_list = FindFastest(varname, sitelist)
-
-+ # Don't print the trailing slash on the last line.
- print "%s=\\" % varname
-- for (url, duration) in latency_list:
-+ for (url, duration) in latency_list[:-1]:
- print "\t%s \\" % (url)
-+ (url, duration) = latency_list[-1]
-+ print "\t%s" % url
-
- print
- sys.stdout.flush()
-
- # Let the network quiesce
- #time.sleep(3)
-+
-+# Walk the dict of sites that we know cause problems.
-+# If explicitly asked to sort one of them be verbose about skipping it
-+# otherwise be silent.
-+for (varname, sitelist) in bad_sites.iteritems():
-+ if len(sys.argv) > 1 and varname in sys.argv[1:]:
-+ print >>sys.stderr, "Unable to sort %s - skipping." % varname