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.
This commit is contained in:
parent
4fdd3b6794
commit
c48b0a13b9
@ -15,7 +15,7 @@
|
||||
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 @@ def _add_to_root_stage(self):
|
||||
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=[
|
||||
|
Loading…
Reference in New Issue
Block a user