summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric <muffgaga@gmx.de>2016-09-20 11:18:26 +0200
committerTodd Gamblin <tgamblin@llnl.gov>2016-09-20 02:18:26 -0700
commitefadc0e2997015545d656f587a5478c9fcc1c2ad (patch)
treeb10da462f4027ab57dc62bc2b4ef298995e8dd6e
parentbd6aac3102f0c107c3c5b65e0e04e342b4065e35 (diff)
downloadspack-efadc0e2997015545d656f587a5478c9fcc1c2ad.tar.gz
spack-efadc0e2997015545d656f587a5478c9fcc1c2ad.tar.bz2
spack-efadc0e2997015545d656f587a5478c9fcc1c2ad.tar.xz
spack-efadc0e2997015545d656f587a5478c9fcc1c2ad.zip
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`).
-rw-r--r--lib/spack/spack/fetch_strategy.py2
1 files changed, 1 insertions, 1 deletions
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):