diff options
author | Peter Scheibel <scheibel1@llnl.gov> | 2016-03-22 10:43:43 -0700 |
---|---|---|
committer | Peter Scheibel <scheibel1@llnl.gov> | 2016-03-22 10:43:43 -0700 |
commit | 75460d8586bf62dcedaf4eb5acdb2de75f1d662a (patch) | |
tree | a35b7113cd976848dbc4f8a380a5c1db5f1f04ee | |
parent | 41a97c8f80b8e93a7b180bd4d4a5a4286ce6f311 (diff) | |
download | spack-75460d8586bf62dcedaf4eb5acdb2de75f1d662a.tar.gz spack-75460d8586bf62dcedaf4eb5acdb2de75f1d662a.tar.bz2 spack-75460d8586bf62dcedaf4eb5acdb2de75f1d662a.tar.xz spack-75460d8586bf62dcedaf4eb5acdb2de75f1d662a.zip |
URLFetchStrategy.archive does a copy vs. a move now
-rw-r--r-- | lib/spack/spack/fetch_strategy.py | 2 | ||||
-rw-r--r-- | lib/spack/spack/stage.py | 7 |
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): |