summaryrefslogtreecommitdiffstats
path: root/bin/quickpkg
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-07-30 23:40:03 +0000
committerZac Medico <zmedico@gentoo.org>2007-07-30 23:40:03 +0000
commit76d01628da445c13663d10a5b9a7d23455288676 (patch)
tree3c9584c52f86441e80bf220afdbbb663dd5ddd57 /bin/quickpkg
parent2552a00682d38b465201231fb1513cdd91483981 (diff)
downloadportage-76d01628da445c13663d10a5b9a7d23455288676.tar.gz
portage-76d01628da445c13663d10a5b9a7d23455288676.tar.bz2
portage-76d01628da445c13663d10a5b9a7d23455288676.zip
As a workaround for bug #185305, make quickpkg break hardlinks during creation of the archive. (trunk r7526)
svn path=/main/branches/2.1.2/; revision=7527
Diffstat (limited to 'bin/quickpkg')
-rwxr-xr-xbin/quickpkg3
1 files changed, 3 insertions, 0 deletions
diff --git a/bin/quickpkg b/bin/quickpkg
index fd3af4ba8..fe7f4dbcc 100755
--- a/bin/quickpkg
+++ b/bin/quickpkg
@@ -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.