summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/relocate.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/spack/spack/relocate.py b/lib/spack/spack/relocate.py
index f90556b7b1..9800718dff 100644
--- a/lib/spack/spack/relocate.py
+++ b/lib/spack/spack/relocate.py
@@ -355,6 +355,7 @@ def relocate_binary(path_names, old_dir, new_dir, allow_root):
rpaths, deps, idpath,
new_rpaths, new_deps, new_idpath)
if (not allow_root and
+ old_dir != new_dir and
strings_contains_installroot(path_name, old_dir)):
raise InstallRootStringException(path_name, old_dir)
@@ -373,6 +374,7 @@ def relocate_binary(path_names, old_dir, new_dir, allow_root):
old_dir, new_dir)
modify_elf_object(path_name, new_rpaths)
if (not allow_root and
+ old_dir != new_dir and
strings_contains_installroot(path_name, old_dir)):
raise InstallRootStringException(path_name, old_dir)
else: