summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPeter Scheibel <scheibel1@llnl.gov>2016-06-08 09:57:56 -0700
committerPeter Scheibel <scheibel1@llnl.gov>2016-06-08 09:57:56 -0700
commit3b71d78f3cddeb1b622b9a49146adadbd1b1d9dc (patch)
treee97cfa0e97ef3059144cd2d20bd6255ddd646555 /lib
parenta2754894ea67e0e751121411ff92d60ca68ab089 (diff)
downloadspack-3b71d78f3cddeb1b622b9a49146adadbd1b1d9dc.tar.gz
spack-3b71d78f3cddeb1b622b9a49146adadbd1b1d9dc.tar.bz2
spack-3b71d78f3cddeb1b622b9a49146adadbd1b1d9dc.tar.xz
spack-3b71d78f3cddeb1b622b9a49146adadbd1b1d9dc.zip
rename URLMirrorFetchStrategy to CacheURLFetchStrategy since it isnt used to manage all mirror URLs - just the cache (the specific behavior that a URL may refer to a stale resource doesn't necessarily apply to mirrors)
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/fetch_strategy.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/spack/spack/fetch_strategy.py b/lib/spack/spack/fetch_strategy.py
index 3221716b91..2607d0a7f4 100644
--- a/lib/spack/spack/fetch_strategy.py
+++ b/lib/spack/spack/fetch_strategy.py
@@ -352,15 +352,14 @@ class URLFetchStrategy(FetchStrategy):
return "[no url]"
-class URLMirrorFetchStrategy(URLFetchStrategy):
- """The resource associated with a URL at a mirror may be out of date.
- """
+class CacheURLFetchStrategy(URLFetchStrategy):
+ """The resource associated with a cache URL may be out of date."""
def __init__(self, *args, **kwargs):
- super(URLMirrorFetchStrategy, self).__init__(*args, **kwargs)
+ super(CacheURLFetchStrategy, self).__init__(*args, **kwargs)
@_needs_stage
def fetch(self):
- super(URLMirrorFetchStrategy, self).fetch()
+ super(CacheURLFetchStrategy, self).fetch()
if self.digest:
try:
self.check()
@@ -847,7 +846,7 @@ class FsCache(object):
def fetcher(self, targetPath, digest):
url = "file://" + join_path(self.root, targetPath)
- return URLMirrorFetchStrategy(url, digest)
+ return CacheURLFetchStrategy(url, digest)
class FetchError(spack.error.SpackError):