-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
view_copy: relocate symlinks #32306
view_copy: relocate symlinks #32306
Conversation
4e2004b
to
170c5c4
Compare
@becker33 this might need a proper refactor, since some valuable information is lost when entering |
Yay! Thanks @haampie! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One request to update a comment, otherwise LGTM.
Oh also an entire conversation with myself about inaccurate old comments, which I'm leaving here in case it's useful for anyone, but should not hold up the PR.
heyo! Just want to make sure we don't forget this one - it's blocking us from building a view of flux in our container bases PR. Thanks! |
bump @becker33... |
7cf45ad
to
5bc9884
Compare
bump @becker33, a month later... can you please review or assign someone else? Thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we come up with unit tests and briefly describe the various cases we test there? I think that would be valuable for future refactoring. Other than that, this basically LGTM.
5bc9884
to
dae5acc
Compare
fixes #33606
fixes #19550
Previously
spack:view:default:link_type:copy
did not handle symlinks:it changed symlinks into redundant file copies, errored on dangling
links, and failed at symlinked directories.
With this commit it actually creates symlinks, and relocates them if
necessary. However, it's far from perfect (doesn't properly check if a
symlink points into a prefix dir in multiple ways: relative symlinks
aren't checked whether they escape the prefix, and absolute symlinks are
not checked in realpath sense). But held to the standard of
Spack's current relocation logic nobody can complain...
Supersedes #31958