From c9b166a9fbe54aa32f038b33e824f8a600f0e2e6 Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Sun, 20 Feb 2011 19:04:27 +0100 Subject: [PATCH] [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. --- .../entropy/spm/plugins/interfaces/portage_plugin/__init__.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/libraries/entropy/spm/plugins/interfaces/portage_plugin/__init__.py b/libraries/entropy/spm/plugins/interfaces/portage_plugin/__init__.py index 18550d083..7d229db11 100644 --- a/libraries/entropy/spm/plugins/interfaces/portage_plugin/__init__.py +++ b/libraries/entropy/spm/plugins/interfaces/portage_plugin/__init__.py @@ -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: