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

miniforge3: wrong sbang replacement #47178

Merged

Conversation

lang-m
Copy link
Contributor

@lang-m lang-m commented Oct 23, 2024

In the sbang line conda replaces the full path to the Python executable with /usr/bin/env python if the full path exceeds 127 characters. This does however break conda deactivate because the wrong Python interpreter is used after activating an environment. The 127 character limit is not relevant in Spack as Spack will automatically use the sbang script to deal with the overly long sbang line.

There is no option to disable this replacement when running the miniforge installer, so the lines have to be changed after running the installer.

In the sbang line conda replaces the full path to the Python executable with `/usr/bin/env python` if the full path exceeds
127 characters. This does however break `conda deactivate` because the wrong Python interpreter is used
after activating an environment. The 127 character limit is not relevant in Spack as Spack will automatically
use the `sbang` script to deal with the overly long sbang line.

There is no option to disable this replacement when running the miniforge installer, so the lines have to be changed
after running the installer.
bernhardkaindl
bernhardkaindl previously approved these changes Oct 23, 2024
Copy link
Contributor

@ChristopherChristofi ChristopherChristofi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the patch, looks good to me and can build successfully

@ChristopherChristofi

This comment was marked as resolved.

This comment was marked as resolved.

This comment was marked as outdated.

@ChristopherChristofi

This comment was marked as resolved.

@bernhardkaindl bernhardkaindl added bugfix Something wasn't working, here's a fix needs-minor-cleanup changes-requested Can be used to make the state more visible approved-by-maintainer labels Oct 23, 2024
@lang-m lang-m force-pushed the fix-miniforge-sbang branch from 8c024e8 to dc38e78 Compare October 24, 2024 08:57
@bernhardkaindl bernhardkaindl removed needs-minor-cleanup changes-requested Can be used to make the state more visible labels Oct 24, 2024
@bernhardkaindl bernhardkaindl merged commit b063765 into spack:develop Oct 24, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved-by-maintainer bugfix Something wasn't working, here's a fix update-package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants