As a workaround for bug #185305, make quickpkg break hardlinks during creation of...
authorZac Medico <zmedico@gentoo.org>
Mon, 30 Jul 2007 23:40:03 +0000 (23:40 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 30 Jul 2007 23:40:03 +0000 (23:40 -0000)
svn path=/main/branches/2.1.2/; revision=7527

bin/quickpkg

index fd3af4ba8a55d4ad3d31567cd6b0d89006b0c15d..fe7f4dbcc7658a69abed6f51504d0730fffc8e82 100755 (executable)
@@ -7,6 +7,7 @@ import errno, signal, stat, sys, os
 
 def tar_contents(contents, root, tar, protect=None, onProgress=None):
        from portage_util import normalize_path
+       import tarfile
        root = normalize_path(root).rstrip(os.path.sep) + os.path.sep
        id_strings = {}
        maxval = len(contents)
@@ -46,6 +47,8 @@ def tar_contents(contents, root, tar, protect=None, onProgress=None):
                tarinfo.gname = id_strings.setdefault(tarinfo.gid, str(tarinfo.gid))
 
                if stat.S_ISREG(lst.st_mode):
+                       # break hardlinks due to bug #185305
+                       tarinfo.type = tarfile.REGTYPE
                        if protect and protect(path):
                                # Create an empty file as a place holder in order to avoid
                                # potential collision-protect issues.