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 Fabio.Erculiani
Recipients Fabio.Erculiani
Date 2011-09-07.10:04:09
SpamBayes Score 4.7949406e-08
Marked as misclassified No
Message-id <1315389851.08.0.471880114138.issue12926@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2011-09-07 10:04:11Fabio.Erculianisetrecipients: + Fabio.Erculiani
2011-09-07 10:04:11Fabio.Erculianisetmessageid: <1315389851.08.0.471880114138.issue12926@psf.upfronthosting.co.za>
2011-09-07 10:04:10Fabio.Erculianilinkissue12926 messages
2011-09-07 10:04:09Fabio.Erculianicreate