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

Don't preserve timestamp in streaming unzip #1749

Merged
merged 2 commits into from
Feb 20, 2024

Conversation

konstin
Copy link
Member

@konstin konstin commented Feb 20, 2024

Summary

Don't preserve mtime to work around alexcrichton/tar-rs#349. Same as #634 except for the streaming unzip.

Fixes #1748.

Test Plan

Added the tomli source dist as test case.

Don't preserve mtime to work around alexcrichton/tar-rs#349. Same as #634 except for the streaming unzip.

Fixes #1748.
@konstin konstin added the bug Something isn't working label Feb 20, 2024
@@ -93,6 +93,7 @@ pub async fn untar<R: tokio::io::AsyncBufRead + Unpin>(
let decompressed_bytes = async_compression::tokio::bufread::GzipDecoder::new(reader);
let mut archive = tokio_tar::ArchiveBuilder::new(decompressed_bytes)
.set_preserve_permissions(false)
Copy link
Member Author

@konstin konstin Feb 20, 2024

Choose a reason for hiding this comment

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

@charliermarsh Do you remember why we have that here but not in the sync impl? Docs say "This flag is disabled by default" in both impls.

Copy link
Member

Choose a reason for hiding this comment

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

I think this is a mistake / typo. I probably meant for this to be mtime.

Copy link
Member

Choose a reason for hiding this comment

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

We probably should be preserving permissions, right?

Copy link
Member Author

Choose a reason for hiding this comment

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

After #1743, i think we should preserve the execute permission, but everything else (read, write and owner, as far as i can tell) should always be set to os defaults. We can adapt the same logic as for wheel for tars (#1743).

Copy link
Member

Choose a reason for hiding this comment

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

Yeah I was wondering if we were missing that for tars.

@charliermarsh charliermarsh enabled auto-merge (squash) February 20, 2024 14:46
@charliermarsh charliermarsh merged commit f7722c0 into main Feb 20, 2024
7 checks passed
@charliermarsh charliermarsh deleted the konsti/dont-preserve-timestamp-streaming branch February 20, 2024 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Source installs fail due to timestamps/zip for flit-based sdists
2 participants