summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/spack/spack/fetch_strategy.py2
-rw-r--r--lib/spack/spack/package.py2
-rw-r--r--lib/spack/spack/test/url_fetch.py2
3 files changed, 3 insertions, 3 deletions
diff --git a/lib/spack/spack/fetch_strategy.py b/lib/spack/spack/fetch_strategy.py
index eaf9f130c5..a01bc143aa 100644
--- a/lib/spack/spack/fetch_strategy.py
+++ b/lib/spack/spack/fetch_strategy.py
@@ -1239,7 +1239,7 @@ def _from_merged_attrs(fetcher, pkg, version):
# TODO: refactor this logic into its own method or function
# TODO: to avoid duplication
mirrors = [spack.url.substitute_version(u, version)
- for u in getattr(pkg, 'urls', [])]
+ for u in getattr(pkg, 'urls', [])[1:]]
attrs = {fetcher.url_attr: url, 'mirrors': mirrors}
else:
url = getattr(pkg, fetcher.url_attr)
diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py
index b7efc3989b..b2d841f145 100644
--- a/lib/spack/spack/package.py
+++ b/lib/spack/spack/package.py
@@ -763,7 +763,7 @@ class PackageBase(with_metaclass(PackageMeta, PackageViewMixin, object)):
# If no specific URL, use the default, class-level URL
url = getattr(self, 'url', None)
urls = getattr(self, 'urls', [None])
- default_url = url or urls.pop(0)
+ default_url = url or urls[0]
# if no exact match AND no class-level default, use the nearest URL
if not default_url:
diff --git a/lib/spack/spack/test/url_fetch.py b/lib/spack/spack/test/url_fetch.py
index 71a122455f..679240049d 100644
--- a/lib/spack/spack/test/url_fetch.py
+++ b/lib/spack/spack/test/url_fetch.py
@@ -32,7 +32,7 @@ def pkg_factory():
def factory(url, urls):
def fn(v):
- main_url = url or urls.pop(0)
+ main_url = url or urls[0]
return spack.url.substitute_version(main_url, v)
return Pkg(