Allow multi-user installations (#1804)

When re-using previously downloaded tarballs, spack copies from
`var/spack/stage/PACKAGE-VERSION-HASH/downloaded_file` to
`var/spack/cache/PACKAGE/downloaded_file`. This fails if the source is owned by
a different user (`shutil.copy` tries to retain all meta data including file
ownership). Change to a non-meta-data copy function (`shutil.copyfile`).
This commit is contained in:
Eric 2016-09-20 11:18:26 +02:00 committed by Todd Gamblin
parent bd6aac3102
commit efadc0e299

View file

@ -306,7 +306,7 @@ def archive(self, destination):
if not self.archive_file:
raise NoArchiveFileError("Cannot call archive() before fetching.")
shutil.copy(self.archive_file, destination)
shutil.copyfile(self.archive_file, destination)
@_needs_stage
def check(self):