This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: tarfile.py fix for bug #949052
Type: Stage:
Components: None Versions:
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: Nosy List: lars.gustaebel, loewis
Priority: normal Keywords: patch

Created on 2004-07-21 10:10 by lars.gustaebel, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
949052.tar.gz lars.gustaebel, 2004-07-21 10:10 eisenmann.patch, posix.patch
Messages (2)
msg46410 - (view) Author: Lars Gustäbel (lars.gustaebel) * (Python committer) Date: 2004-07-21 10:10
Contained are two patches:

eisenmann.patch - a modified version of OP Simon
Eisenmann's patch that prevents tarfile.py from setting
the size attribute for directory members.

posix.patch - Simon brought up another issue:

tarfile.py operates in posix mode by default. My
original idea behind this was that it provides a higher
portability to other archiver programs (if they adhere
to the posix standard). Simon states that e.g. WinZip
is not able to read posix-compliant tar archives but
those with GNU extensions. So I think the idea of being
as portable as possible has proven false. GNU tar
format is a quasi-standard.

The second issue is that posix mode imposes several
limits - on pathname lengths in particular - since GNU
extensions are not allowed. For the average user, this
must be annoying, he does not care about posix and all
this portability stuff, he simply wants to add files
regardless of the length of their pathnames. But he
first has to search the docs and set TarFile's posix
attribute to False to enable GNU extensions. Even worse
is that e.g. backup scripts that run flawlessly for
months can suddenly fail just because there's a new
file with a long pathname that posix mode cannot handle.

To cut a long story short, I second Simon's proposal.
Since I contributed tarfile.py to Python's stdlib I had
the feeling I had made the wrong decision.
msg46411 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2004-08-18 13:58
Logged In: YES 
user_id=21627

Thanks for the patch, committed as

libtarfile.tex 1.5
tarfile.py 1.16
NEWS 1.1103

Because of the behaviour change, a backport to 2.3 is not
possible.
History
Date User Action Args
2022-04-11 14:56:05adminsetgithub: 40610
2004-07-21 10:10:30lars.gustaebelcreate