-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Improve handling of tarballs that don't consist of a single top-level directory #11195
Conversation
Fixes NixOS#4785 (top-level directories are no longer merged into one). Fixes NixOS#10983 (top-level non-directories are no longer discarded).
I think this should also be the behavior for single non-executable files. Tarballs are expected to behave like directories, so we should probably always return a directory, even if it only has a single file. |
Yeah, it looks like even Nix 2.3 returned an empty directory so I'll change it to dereference directories only. |
Since this yielded an empty directory as far back as Nix 2.3, we don't really need special handling for executables vs non-executables.
Co-authored-by: Robert Hensing <[email protected]>
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/2024-07-29-nix-team-meeting-minutes-165/49970/1 |
Motivation
When unpacking tarballs, we now only strip the top-level path component if the tarball consists of a single directory or a single non-executable file.
Fixes #4785: top-level directories are no longer merged into one.
Fixes #10983: top-level non-directories are no longer discarded.
Closes #9053.
Context
Priorities and Process
Add 👍 to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.