classification
Title: tarfile: broken hardlink handling and testcase.
Type: behavior Stage:
Components: Library (Lib) Versions: Python 3.1, Python 3.2, Python 2.7, Python 2.6
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: lars.gustaebel Nosy List: jsbronder, lars.gustaebel
Priority: normal Keywords: patch

Created on 2010-05-27 16:07 by jsbronder, last changed 2010-06-03 10:18 by lars.gustaebel. This issue is now closed.

Files
File name Uploaded Description Edit
python-2.7-tarfile-hardlinks.patch jsbronder, 2010-05-27 16:07
Messages (2)
msg106612 - (view) Author: Justin Bronder (jsbronder) Date: 2010-05-27 16:07
When adding hardlinks to an archive, tarfile does not set the size
of each additional link to zero as specified by the tar format [1].

In addition, the current test case hardlinks is also broken.
Instead of testing that the size of a hardlink to a non-empty file
is 0, it tests that the size to a empty file is zero, which cannot
fail.

A patch against current svn trunk is attached and was tested with
'python -m test.regrtest  -v test_tarfile'


1. http://www.gnu.org/software/tar/manual/tar.html#SEC170
msg106936 - (view) Author: Lars Gustäbel (lars.gustaebel) * (Python committer) Date: 2010-06-03 10:18
Thank you very much for this valuable report. Fixed in r81663-81666.
History
Date User Action Args
2010-06-03 10:18:09lars.gustaebelsetstatus: open -> closed
resolution: accepted
messages: + msg106936

versions: + Python 2.6, Python 3.1, Python 3.2
2010-05-27 21:02:07lars.gustaebelsetassignee: lars.gustaebel

nosy: + lars.gustaebel
2010-05-27 16:07:07jsbrondercreate