Skip to content

Make sure conda does not use polyglot shebangs #12043

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

Merged
merged 8 commits into from
Nov 17, 2022
Merged

Make sure conda does not use polyglot shebangs #12043

merged 8 commits into from
Nov 17, 2022

Conversation

jaimergp
Copy link
Contributor

@jaimergp jaimergp commented Nov 1, 2022

Description

Minimum work to fix #11885 and close #11893.

More robust solution long-term available at #11995.

Basically we prevent conda from using the polyglot shebang approach with two checks:

  • If conda-build is being used and the executable is inside $PREFIX, we are most probably packaging conda. Do nothing and let prefix replacement handle that at install time (replace_long_shebang() right above our function)
  • If somebody uses conda init --install outside conda-build (there's no reason to, but 🤷), we ensure they end up with a #!/usr/bin/env python shebang by calling the function with a new flag.

Checklist - did you ...

  • Add a file to the news directory (using the template) for the next release's release notes?
  • Add / update necessary tests?
  • Add / update outdated documentation?

@jaimergp jaimergp added the build::review trigger a build for this PR label Nov 1, 2022
@conda-bot conda-bot added the cla-signed [bot] added once the contributor has signed the CLA label Nov 1, 2022
@conda-bot conda-bot removed the build::review trigger a build for this PR label Nov 1, 2022
@conda-bot
Copy link
Contributor

conda-bot commented Nov 1, 2022

Review build status

The workflow for building and uploading a canary release for conda with the label conda-conda-pr-12043 in channel conda-canary was started by @jaimergp!

Once it's done, use this command to try it out in a new conda environment:

conda install -c conda-canary/label/conda-conda-pr-12043 conda

@jaimergp jaimergp mentioned this pull request Nov 1, 2022
3 tasks
@kenodegard kenodegard added the in-progress issue is actively being worked on label Nov 3, 2022
@jaimergp
Copy link
Contributor Author

jaimergp commented Nov 3, 2022

Ready for review but I want to check the canaries that come out of this PR once #12047 is addressed.

@jaimergp jaimergp marked this pull request as ready for review November 3, 2022 13:29
@jaimergp jaimergp requested a review from a team as a code owner November 3, 2022 13:29
@jezdez jezdez added this to the 22.11.0 milestone Nov 8, 2022
@jaimergp jaimergp mentioned this pull request Nov 10, 2022
3 tasks
@jaimergp
Copy link
Contributor Author

Are canaries online again? :D

@jezdez jezdez merged commit f356172 into main Nov 17, 2022
@jezdez jezdez deleted the hotfix-ps1 branch November 17, 2022 13:17
@jaimergp
Copy link
Contributor Author

I asked about the canaries because I wanted to review how the entry points were being rendered 😬

@kenodegard
Copy link
Contributor

conda-build 3.23.0 is on defaults now, we'll get the canary builds on the main branch shortly

@jaimergp
Copy link
Contributor Author

Awesome, the test changes in the recipe should reveal the shebangs properly. So we just need to check the logs.

@github-actions github-actions bot added the locked [bot] locked due to inactivity label Nov 19, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla-signed [bot] added once the contributor has signed the CLA in-progress issue is actively being worked on locked [bot] locked due to inactivity
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Spaces in prefix fix breaks passing the $PS1 environment variable conda 22.9.0 breaks bash command prompt
7 participants