Use abspath to avoid permission errors(#7241)
Fixes #5189 When working with non-normalized paths containing ".." on some file systems, Spack was found to encounter a permission error when writing to the path. This normalizes a path written by the intel-parallel-studio package and also normalizes all paths written by the license install hook (for all packages) to avoid this issue for intel-parallel-studio.
This commit is contained in:

committed by
scheibelp

parent
557e6ba2f9
commit
8ae50ae8bb
@@ -157,6 +157,7 @@ def symlink_license(pkg):
|
||||
target = pkg.global_license_file
|
||||
for filename in pkg.license_files:
|
||||
link_name = join_path(pkg.prefix, filename)
|
||||
link_name = os.path.abspath(link_name)
|
||||
license_dir = os.path.dirname(link_name)
|
||||
if not os.path.exists(license_dir):
|
||||
mkdirp(license_dir)
|
||||
|
Reference in New Issue
Block a user