summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorPramod S Kumbhar <pramod.r.s.kumbhar@gmail.com>2018-02-16 02:26:37 +0100
committerscheibelp <scheibel1@llnl.gov>2018-02-15 17:26:37 -0800
commit8ae50ae8bbdd823c4ac3108c7bc835a543329eb3 (patch)
tree4aa875d9242454424eb565946c690bfc038d0bd9 /var
parent557e6ba2f9478491b87939314b9ef0378c4ed3fe (diff)
downloadspack-8ae50ae8bbdd823c4ac3108c7bc835a543329eb3.tar.gz
spack-8ae50ae8bbdd823c4ac3108c7bc835a543329eb3.tar.bz2
spack-8ae50ae8bbdd823c4ac3108c7bc835a543329eb3.tar.xz
spack-8ae50ae8bbdd823c4ac3108c7bc835a543329eb3.zip
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.
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/intel-parallel-studio/package.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/intel-parallel-studio/package.py b/var/spack/repos/builtin/packages/intel-parallel-studio/package.py
index ccfac3c9a9..e8ac829757 100644
--- a/var/spack/repos/builtin/packages/intel-parallel-studio/package.py
+++ b/var/spack/repos/builtin/packages/intel-parallel-studio/package.py
@@ -433,6 +433,7 @@ class IntelParallelStudio(IntelPackage):
for compiler in ['icc', 'icpc', 'ifort']:
cfgfilename = os.path.join(
self.prefix, self.bin_dir, '{0}.cfg'.format(compiler))
+ cfgfilename = os.path.abspath(cfgfilename)
with open(cfgfilename, 'w') as f:
f.write('-Xlinker -rpath -Xlinker {0}\n'.format(lib_dir))
@@ -443,7 +444,7 @@ class IntelParallelStudio(IntelPackage):
bindir = glob.glob(join_path(
self.prefix, 'parallel_studio*', 'bin'))[0]
-
+ bindir = os.path.abspath(bindir)
if self.version[1] > 2016:
filter_file('^SCRIPTPATH=.*', 'SCRIPTPATH={0}'.format(self.prefix),
os.path.join(bindir, 'psxevars.sh'),