From efadc0e2997015545d656f587a5478c9fcc1c2ad Mon Sep 17 00:00:00 2001 From: Eric Date: Tue, 20 Sep 2016 11:18:26 +0200 Subject: 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`). --- lib/spack/spack/fetch_strategy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/fetch_strategy.py b/lib/spack/spack/fetch_strategy.py index 4349e32d4f..21802c4556 100644 --- a/lib/spack/spack/fetch_strategy.py +++ b/lib/spack/spack/fetch_strategy.py @@ -306,7 +306,7 @@ class URLFetchStrategy(FetchStrategy): 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): -- cgit v1.2.3-70-g09d2