New submission from Fabio Erculiani <lx...@sabayonlinux.org>:

TarFile.makelink() is plain broken.
Test file: 
http://git.sabayon.org/entropy.git/tree/libraries/tests/packages/amarok-2.2.2.90.tbz2

_extract_member calls makelink which does os.symlink() and then falls to the 
else branch and calls back _extract_member(), which calls makelink() which 
calls os.symlink() and causes errno 17.

ERROR: test_db_insert_compare_match_mime (__main__.EntropyRepositoryTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "db.py", line 490, in test_db_insert_compare_match_mime
    data = self.Spm.extract_package_metadata(test_pkg)
  File "../entropy/spm/plugins/interfaces/portage_plugin/__init__.py", line 
1038, in extract_package_metadata
    extract_path = pkg_dir, catch_empty = False)
  File "../entropy/tools.py", line 2088, in uncompress_tarball
    tar.extract(tarinfo, encoded_path)
  File "/usr/lib64/python3.2/tarfile.py", line 2174, in extract
    set_attrs=set_attrs)
  File "/usr/lib64/python3.2/tarfile.py", line 2258, in _extract_member
    self.makelink(tarinfo, targetpath)
  File "/usr/lib64/python3.2/tarfile.py", line 2358, in makelink
    targetpath)
  File "/usr/lib64/python3.2/tarfile.py", line 2258, in _extract_member
    self.makelink(tarinfo, targetpath)
  File "/usr/lib64/python3.2/tarfile.py", line 2341, in makelink
    os.symlink(tarinfo.linkname, targetpath)
OSError: [Errno 17] File exists

----------
components: Library (Lib)
messages: 143667
nosy: Fabio.Erculiani
priority: normal
severity: normal
status: open
title: tarfile tarinfo.extract*() broken with symlinks
type: crash
versions: Python 3.2

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue12926>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to