URLFetchStrategy.archive does a copy vs. a move now

This commit is contained in:
Peter Scheibel 2016-03-22 10:43:43 -07:00
parent 41a97c8f80
commit 75460d8586
2 changed files with 3 additions and 6 deletions

View File

@ -268,7 +268,7 @@ def archive(self, destination):
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):

View File

@ -323,11 +323,8 @@ def check(self):
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):