[entropy.spm] generate_package(): fix broken handling of hard-links

Since tar-1.24, tar supports hard links, same for python-2.6.6.
However, generate_package() was resetting the file type on the
tarinfo object, causing the extractor (either tar or python tarfile)
to handle the file like it was a 0-size one.
dev-vcs/git package was broken due to this and there are probably
others.
This commit is contained in:
Fabio Erculiani
2011-02-20 19:04:27 +01:00
parent 7b6e07e535
commit c9b166a9fb
@@ -804,8 +804,6 @@ class PortagePlugin(SpmPlugin):
tarinfo = tar.gettarinfo(lpath, arcname)
if stat.S_ISREG(exist.st_mode):
tarinfo.mode = stat.S_IMODE(exist.st_mode)
tarinfo.type = tarfile.REGTYPE
with open(path, "rb") as f:
tar.addfile(tarinfo, f)
else: