Repository navigation
Conversation
Fields of a pax extended header that were read from an archive no longer have priority over TarInfo attributes that were changed afterwards. Fields set in TarInfo.pax_headers by the program and fields of unchanged members are written as before.
Documentation build overview
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TarInfo.create_pax_header()gave every record inpax_headerspriority over the attributes, including records that were only there because the member was read from an archive, so renaming such a member (or changing its link name, owner, size or mtime) beforeaddfile()was undone in the output._apply_pax_info()now remembers each record it applied together with the attribute value it produced, andcreate_pax_header()drops a record that is still the one that was read when the attribute no longer has that value.Records a program sets in
pax_headersitself keep their priority (test_pax_extended_headeris unchanged), and unchanged members are written as before, including high-precisionmtimerecords. One side effect: a member whose name came from a GNU long name header preceding a paxpathrecord is now rewritten under the nametarfilereports for it. Output changes for members whose attributes were changed, so I have not added backport labels; that is open for discussion.Fixes #161045
ANT-2026-5IOHYLV3 ANT-2026-6CEC28KL
tarfilewrites a member's old pax records after its name or other attributes are changedย #161045