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

Ignore .condarc files during installation #863

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

marcoesters
Copy link
Contributor

Description

conda-standalone and micromamba load existing .condarc files during the installation process, which can have unintended consequences and even break the installation. These issues have been frequently reported (see #542, #568, and the issues reported therein). The behavior of the installer should be set by the installer itself and not by residual configuration files, especially since they are not cleaned up at all (see #642).

micromamba has a --no-rc option, which is also proposed to be added to conda-standalone (conda/conda-standalone#99). This feature will add the --no-rc option with compatible standalone executables.

Closes #542 and #568.

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?

@conda-bot conda-bot added the cla-signed [bot] added once the contributor has signed the CLA label Sep 19, 2024
@marcoesters marcoesters linked an issue Sep 19, 2024 that may be closed by this pull request
3 tasks
@marcoesters marcoesters marked this pull request as ready for review September 19, 2024 19:00
@marcoesters marcoesters requested a review from a team as a code owner September 19, 2024 19:00
constructor/main.py Outdated Show resolved Hide resolved
@@ -197,6 +197,15 @@ def main_build(dir_path, output_dir='.', platform=cc_platform,
)
)

# Add --no-rc option to CONDA_EXE command so that existing
# .condarc files do not pollute the installation process.
if exe_name == "conda-standalone" and Version(exe_version) >= Version("24.9.0"):
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if exe_name == "conda-standalone" and Version(exe_version) >= Version("24.9.0"):
if exe_name == "conda-standalone" and exe_version and Version(exe_version) >= Version("24.9.0"):

Protect against exe_version = None.

@marcoesters
Copy link
Contributor Author

marcoesters commented Oct 1, 2024

Even if approved, we should probably wait with merging this until conda-standalone 24.9.x is released and I had the chance to re-run the tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed [bot] added once the contributor has signed the CLA
Projects
Status: Approved
4 participants