summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/build_systems/xorg.py5
-rw-r--r--lib/spack/spack/fetch_strategy.py9
2 files changed, 10 insertions, 4 deletions
diff --git a/lib/spack/spack/build_systems/xorg.py b/lib/spack/spack/build_systems/xorg.py
index 815bb7c26b..ae28b30929 100644
--- a/lib/spack/spack/build_systems/xorg.py
+++ b/lib/spack/spack/build_systems/xorg.py
@@ -14,9 +14,14 @@ class XorgPackage(spack.package.PackageBase):
xorg_mirror_path = None
#: List of x.org mirrors used by Spack
+ # Note: x.org mirrors are a bit tricky, since many are out-of-sync or off.
+ # A good package to test with is `util-macros`, which had a "recent"
+ # release.
base_mirrors = [
'https://www.x.org/archive/individual/',
'https://mirrors.ircam.fr/pub/x.org/individual/',
+ 'https://mirror.transip.net/xorg/individual/',
+ 'ftp://ftp.freedesktop.org/pub/xorg/individual/',
'http://xorg.mirrors.pair.com/individual/'
]
diff --git a/lib/spack/spack/fetch_strategy.py b/lib/spack/spack/fetch_strategy.py
index c6200565e5..5f0cc4db5d 100644
--- a/lib/spack/spack/fetch_strategy.py
+++ b/lib/spack/spack/fetch_strategy.py
@@ -292,6 +292,7 @@ class URLFetchStrategy(FetchStrategy):
tty.msg("Already downloaded %s" % self.archive_file)
return
+ url = None
for url in self.candidate_urls:
try:
partial_file, save_file = self._fetch_from_url(url)
@@ -303,7 +304,7 @@ class URLFetchStrategy(FetchStrategy):
pass
if not self.archive_file:
- raise FailedDownloadError(self.url)
+ raise FailedDownloadError(url)
def _fetch_from_url(self, url):
save_file = None
@@ -369,12 +370,12 @@ class URLFetchStrategy(FetchStrategy):
if curl.returncode == 22:
# This is a 404. Curl will print the error.
raise FailedDownloadError(
- self.url, "URL %s was not found!" % self.url)
+ url, "URL %s was not found!" % url)
elif curl.returncode == 60:
# This is a certificate error. Suggest spack -k
raise FailedDownloadError(
- self.url,
+ url,
"Curl was unable to fetch due to invalid certificate. "
"This is either an attack, or your cluster's SSL "
"configuration is bad. If you believe your SSL "
@@ -386,7 +387,7 @@ class URLFetchStrategy(FetchStrategy):
# This is some other curl error. Curl will print the
# error, but print a spack message too
raise FailedDownloadError(
- self.url,
+ url,
"Curl failed with error %d" % curl.returncode)
# Check if we somehow got an HTML file rather than the archive we