[issue24514] tarfile fails to extract archive (handled fine by gnu tar and bsdtar)

2015-07-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset 301d7efac3de by Lars Gustäbel in branch '2.7': Issue #24514: tarfile now tolerates number fields consisting of only whitespace. https://hg.python.org/cpython/rev/301d7efac3de New changeset 140b4b7b84bd by Lars Gustäbel in branch '3.4': Issue

[issue24514] tarfile fails to extract archive (handled fine by gnu tar and bsdtar)

2015-07-02 Thread Lars Gustäbel
Changes by Lars Gustäbel l...@gustaebel.de: -- resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24514 ___

[issue24514] tarfile fails to extract archive (handled fine by gnu tar and bsdtar)

2015-06-29 Thread Tal Einat
Tal Einat added the comment: The patch is very simple, but this needs tests. At the very least, a simple tar file which reproduces this issue could be added to the tests. Taking this a step further would be writing some unit tests for the internal nti() and itn() functions, and perhaps also

[issue24514] tarfile fails to extract archive (handled fine by gnu tar and bsdtar)

2015-06-29 Thread Lars Gustäbel
Lars Gustäbel added the comment: I think a simple addition to the existing unittest for nti() will be enough. itn() seems well-tested, and nts() and stn() are not affected, because they don't operate on numbers. -- Added file: http://bugs.python.org/file39832/issue24514.diff

[issue24514] tarfile fails to extract archive (handled fine by gnu tar and bsdtar)

2015-06-26 Thread Lars Gustäbel
Lars Gustäbel added the comment: The problem is that the tar archive has empty uid and gid fields, i.e. 7 spaces terminated with a null-byte. I attached a patch that solves the problem. -- keywords: +patch Added file: http://bugs.python.org/file39815/issue24514.diff

[issue24514] tarfile fails to extract archive (handled fine by gnu tar and bsdtar)

2015-06-26 Thread Philippe
Philippe added the comment: lars: you are my hero! you rock. I picture you being able to read through tar binary headers while you sleep. I am in awe. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24514

[issue24514] tarfile fails to extract archive (handled fine by gnu tar and bsdtar)

2015-06-26 Thread Lars Gustäbel
Lars Gustäbel added the comment: You're welcome :-D -- assignee: - lars.gustaebel priority: normal - low stage: - patch review type: - behavior versions: +Python 3.5, Python 3.6 ___ Python tracker rep...@bugs.python.org

[issue24514] tarfile fails to extract archive (handled fine by gnu tar and bsdtar)

2015-06-26 Thread Philippe
Philippe added the comment: I verified that the patch issue24514.diff (adding .rstrip() ) works also on Python 2.7. I verified it also works on Python 3.4 I ran it on 2.7 against a fairly large test suite of tar files without problems. This is a +1 for me. Lars: Do you think you could apply

[issue24514] tarfile fails to extract archive (handled fine by gnu tar and bsdtar)

2015-06-26 Thread Philippe
Philippe added the comment: Note: the traceback above are from calling taropen on the gunzipped tar.gz The error are similar but a tar less informative when using the tgz and open. -- ___ Python tracker rep...@bugs.python.org

[issue24514] tarfile fails to extract archive (handled fine by gnu tar and bsdtar)

2015-06-26 Thread Philippe
New submission from Philippe: The extraction fails when calling tarfile.open using this archive: http://archive.apache.org/dist/commons/logging/source/commons-logging-1.1.2-src.tar.gz After some investigation, the file can be extracted with gnu tar and bsdtar and the gzip compression is not

[issue24514] tarfile fails to extract archive (handled fine by gnu tar and bsdtar)

2015-06-26 Thread Lars Gustäbel
Lars Gustäbel added the comment: Yes, Python 2.7 still gets bugfixes. However, there's still some work to do on the patch (maybe clean the code, write a test, add a NEWS entry). -- ___ Python tracker rep...@bugs.python.org