Skip to content

Commit

Permalink
Use relative target in symlinks to modified files in view (spack#42699)
Browse files Browse the repository at this point in the history
  • Loading branch information
haampie authored Feb 19, 2024
1 parent ad6dc0d commit 0ee3a3c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/spack/spack/build_systems/python.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ def add_files_to_view(self, view, merge_map, skip_if_exists=True):
except (OSError, KeyError):
target = None
if target:
os.symlink(target, dst)
os.symlink(os.path.relpath(target, os.path.dirname(dst)), dst)
else:
view.link(src, dst, spec=self.spec)

Expand Down
2 changes: 1 addition & 1 deletion var/spack/repos/builtin/packages/python/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -1306,7 +1306,7 @@ def add_files_to_view(self, view, merge_map, skip_if_exists=True):
except (OSError, KeyError):
target = None
if target:
os.symlink(target, dst)
os.symlink(os.path.relpath(target, os.path.dirname(dst)), dst)
else:
view.link(src, dst, spec=self.spec)

Expand Down

0 comments on commit 0ee3a3c

Please sign in to comment.