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.

Author Larry Cook
Recipients Jussi Judin, Larry Cook, guettli, lars.gustaebel
Date 2018-02-16.15:04:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1518793458.26.0.467229070634.issue29612@psf.upfronthosting.co.za>
In-reply-to
Content
I recently hit this with Python 2.7.5 and 2.7.13.  It has a very simple repro.  Just specify the same file twice on the command line to tar (GNU 1.26):

% tar cvf test.tar test.txt test.txt
test.txt
test.txt

% tar tvf test.tar
-rw-r--r-- root/root        24 2018-02-16 09:35 test.txt
hrw-r--r-- root/root         0 2018-02-16 09:35 test.txt link to test.txt

% python2.7
Python 2.7.5 (default, Aug  4 2017, 00:39:18) 
[GCC 4.8.5 20150623 (Red Hat 4.8.5-16)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import tarfile
>>> tarball = tarfile.open("test.tar")
>>> tarball.extractall()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python2.7/tarfile.py", line 2047, in extractall
    self.extract(tarinfo, path)
  File "/usr/lib64/python2.7/tarfile.py", line 2084, in extract
    self._extract_member(tarinfo, os.path.join(path, tarinfo.name))
  File "/usr/lib64/python2.7/tarfile.py", line 2168, in _extract_member
    self.makelink(tarinfo, targetpath)
  File "/usr/lib64/python2.7/tarfile.py", line 2252, in makelink
    os.link(tarinfo._link_target, targetpath)
OSError: [Errno 2] No such file or directory
>>>
History
Date User Action Args
2018-02-16 15:04:18Larry Cooksetrecipients: + Larry Cook, guettli, lars.gustaebel, Jussi Judin
2018-02-16 15:04:18Larry Cooksetmessageid: <1518793458.26.0.467229070634.issue29612@psf.upfronthosting.co.za>
2018-02-16 15:04:18Larry Cooklinkissue29612 messages
2018-02-16 15:04:18Larry Cookcreate