Larry Cook <lc...@hytrust.com> added the comment: 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 >>> ---------- nosy: +Larry Cook _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue29612> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com