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:
		 Owen Solberg
					Owen Solberg
				
			
				
					committed by
					
						 Peter Scheibel
						Peter Scheibel
					
				
			
			
				
	
			
			
			 Peter Scheibel
						Peter Scheibel
					
				
			
						parent
						
							4fdd3b6794
						
					
				
				
					commit
					c48b0a13b9
				
			| @@ -15,7 +15,7 @@ | |||||||
| from six.moves.urllib.parse import urljoin | from six.moves.urllib.parse import urljoin | ||||||
|  |  | ||||||
| import llnl.util.tty as tty | 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 | from llnl.util.filesystem import remove_if_dead_link, remove_linked_tree | ||||||
|  |  | ||||||
| import spack.paths | import spack.paths | ||||||
| @@ -548,9 +548,9 @@ def _add_to_root_stage(self): | |||||||
|                 src = os.path.realpath(source_path) |                 src = os.path.realpath(source_path) | ||||||
|  |  | ||||||
|                 if os.path.isdir(src): |                 if os.path.isdir(src): | ||||||
|                     copy_tree(src, destination_path) |                     install_tree(src, destination_path) | ||||||
|                 else: |                 else: | ||||||
|                     copy(src, destination_path) |                     install(src, destination_path) | ||||||
|  |  | ||||||
|  |  | ||||||
| @pattern.composite(method_list=[ | @pattern.composite(method_list=[ | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user