Skip to content
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

Prefer llnl.util.symlink.readlink #44126

Merged
merged 1 commit into from
May 16, 2024
Merged

Conversation

johnwparent
Copy link
Contributor

@johnwparent johnwparent commented May 10, 2024

os.readlink can introduce Windows longpath prefixes (\\?\) which are fine in the context of win32 API interactions but break numerous facets of Spack behavior that rely on string parsing/matching (archiving, binary distributions, tarball extraction, view regen, etc). Spack's internal readlink method (llnl.util.symlink.readlink) gracefully handles this by removing the prefix and otherwise behaving exactly as os.readlink does, so we should prefer that in all cases.

@spackbot-app spackbot-app bot added architecture commands core PR affects Spack core functionality environments tests General test capability(ies) update-package utilities labels May 10, 2024

This comment was marked as off-topic.

@johnwparent
Copy link
Contributor Author

atttn @jamessmillie You may or may not hit symlinking + permissions errors when dealing with your envs (and associated views), so if you do, this is likely your solution.

os.readlink can introduce Windows longpath prefixes (\\?\) which are fine in the context of win32 API interactions but break numerous facets of Spack behavior that rely on string parsing/matching (archiving, binary distributions, tarball extraction, view regen, etc).
Spack's internal readlink method gracefully handles this by removing the prefix and otherwise behaving exactly as os.readlink does, so we should prefer that in all cases.
@scheibelp scheibelp merged commit 1ce0984 into spack:develop May 16, 2024
34 of 35 checks passed
@johnwparent johnwparent added this to the v0.22.1 milestone May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
architecture commands core PR affects Spack core functionality environments tests General test capability(ies) update-package utilities
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants