summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/spack/spack/fetch_strategy.py2
-rw-r--r--lib/spack/spack/stage.py7
2 files changed, 3 insertions, 6 deletions
diff --git a/lib/spack/spack/fetch_strategy.py b/lib/spack/spack/fetch_strategy.py
index 0d0a7db8a9..fc5d7e231c 100644
--- a/lib/spack/spack/fetch_strategy.py
+++ b/lib/spack/spack/fetch_strategy.py
@@ -268,7 +268,7 @@ class URLFetchStrategy(FetchStrategy):
if not extension(destination) == extension(self.archive_file):
raise ValueError("Cannot archive without matching extensions.")
- shutil.move(self.archive_file, destination)
+ shutil.copy(self.archive_file, destination)
@_needs_stage
def check(self):
diff --git a/lib/spack/spack/stage.py b/lib/spack/spack/stage.py
index 61faec6de9..54359bddce 100644
--- a/lib/spack/spack/stage.py
+++ b/lib/spack/spack/stage.py
@@ -323,11 +323,8 @@ class Stage(object):
def cache_local(self):
archiveDst = join_path(os.path.abspath(spack.cache_path), self.mirror_path)
- if not os.path.exists(archiveDst): #tmp conditional
- mkdirp(os.path.dirname(archiveDst))
- # TODO: this moves the archive for URLFetchStrategy vs. a copy -
- # edit to do a move?
- self.fetcher.archive(archiveDst)
+ mkdirp(os.path.dirname(archiveDst))
+ self.fetcher.archive(archiveDst)
def expand_archive(self):