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

Install to tmpdir then atomic move #1116

Merged
merged 1 commit into from
Feb 8, 2025
Merged

Install to tmpdir then atomic move #1116

merged 1 commit into from
Feb 8, 2025

Conversation

mxcl
Copy link
Member

@mxcl mxcl commented Feb 8, 2025

Refs #1100

@mxcl mxcl requested a review from jhheider February 8, 2025 06:22
@@ -7,6 +7,7 @@ use tokio_tar::Archive;

// Compatibility trait lets us call `compat()` on a futures::io::AsyncRead
// to convert it into a tokio::io::AsyncRead.
use tempfile::{self, tempdir_in};
Copy link
Contributor

Choose a reason for hiding this comment

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

Probably shouldn't be between this comment and the following line.

@mxcl
Copy link
Member Author

mxcl commented Feb 8, 2025

The failure seems to be due to the way the tempfile crate handles self-deleting the tempdir. https://docs.rs/tempfile/latest/tempfile/#early-drop-pitfall

But I am struggling to stop it doing it. It’s remarkable consistent when installing git. It’s always the openssl.org bottle that fails to get moved before the temp_dir is deleted.

@mxcl
Copy link
Member Author

mxcl commented Feb 8, 2025

lol it's because semverator renders the openSSL version as 1.1.1.23. My bad when implementing the render function probs.

@mxcl mxcl force-pushed the install-to-tmp branch 3 times, most recently from 7b5e998 to 1fd2a4a Compare February 8, 2025 14:48
@mxcl mxcl merged commit 4cb6d60 into main Feb 8, 2025
14 checks passed
@mxcl mxcl deleted the install-to-tmp branch February 8, 2025 14:55
@coveralls
Copy link

Coverage Status

coverage: 90.928% (+0.006%) from 90.922%
when pulling 2c7ad18 on install-to-tmp
into f5bc893 on main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants