summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorOwen Solberg <odoublewen@users.noreply.github.com>2019-01-08 17:56:16 -0800
committerPeter Scheibel <scheibel1@llnl.gov>2019-01-08 17:56:16 -0800
commitc48b0a13b9dbf83f76822d5ccfe42c23cfaed1b5 (patch)
treecc4cf6c1a35fa82ac955c6de7fc13232d4236ebf /lib
parent4fdd3b6794bee53a3a629615b801f8ee939fe533 (diff)
downloadspack-c48b0a13b9dbf83f76822d5ccfe42c23cfaed1b5.tar.gz
spack-c48b0a13b9dbf83f76822d5ccfe42c23cfaed1b5.tar.bz2
spack-c48b0a13b9dbf83f76822d5ccfe42c23cfaed1b5.tar.xz
spack-c48b0a13b9dbf83f76822d5ccfe42c23cfaed1b5.zip
bug fix: copy permissions when staging (#10285)
Fixes #10284 #10152 replaced shutil.move with llnl's copy and copy_tree for resources. This did not copy permissions so led to later failures if an executable was copied (e.g. a configure script). This uses install/install_tree instead, which preserve permissions.
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/stage.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/spack/spack/stage.py b/lib/spack/spack/stage.py
index b337ae5617..fb0df21e6f 100644
--- a/lib/spack/spack/stage.py
+++ b/lib/spack/spack/stage.py
@@ -15,7 +15,7 @@ from six import iteritems
from six.moves.urllib.parse import urljoin
import llnl.util.tty as tty
-from llnl.util.filesystem import mkdirp, can_access, copy, copy_tree
+from llnl.util.filesystem import mkdirp, can_access, install, install_tree
from llnl.util.filesystem import remove_if_dead_link, remove_linked_tree
import spack.paths
@@ -548,9 +548,9 @@ class ResourceStage(Stage):
src = os.path.realpath(source_path)
if os.path.isdir(src):
- copy_tree(src, destination_path)
+ install_tree(src, destination_path)
else:
- copy(src, destination_path)
+ install(src, destination_path)
@pattern.composite(method_list=[