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

fix: Ensure root prefix's conda-meta folder presence #3752

Conversation

jjerphan
Copy link
Member

Fix #3734.

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>
micromamba/src/update.cpp Outdated Show resolved Hide resolved
fs::u8path conda_meta_path = ctx.prefix_params.target_prefix / "conda-meta";
if (!fs::exists(conda_meta_path))
{
fs::create_directories(conda_meta_path);
Copy link
Member

Choose a reason for hiding this comment

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

My understanding is that create_directories will not fail and is no-op if the path already exists, so the if doesnt seem necessary.

Co-authored-by: Klaim (Joël Lamotte) <142265+Klaim@users.noreply.github.com>
Copy link
Member

@Hind-M Hind-M left a comment

Choose a reason for hiding this comment

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

conda-meta creation is more complex than what it seems (IIRC it depends on the command we're using create, update, install etc and the corresponding rules/constraints are different).
So I don't think we can just create the directory here without checking the (expected) behavior more thoroughly.
Also, IIUC the issue, this is not necessary and the corresponding fix was merged after 2.0.2 version.
So having this error is normal (as it's updating from 2.0.2).

@jjerphan
Copy link
Member Author

Oh, I did not see #3572, and the original issue is not reproducible, so I guess we can close this PR.

@jjerphan jjerphan closed this Jan 16, 2025
@jjerphan jjerphan deleted the fix/self-update-ensure-root-prefix-conda-meta branch January 16, 2025 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release::bug_fixes For PRs fixing bugs
Projects
None yet
3 participants