summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-07-30 23:37:27 +0000
committerZac Medico <zmedico@gentoo.org>2007-07-30 23:37:27 +0000
commit14128bb63cf7825520b08a1226132dd957809cc5 (patch)
tree4c6a148bf441debb16c19260819105ae44f96f60
parent807492a40ed39898af4b4dc6d29aabcc7c8865d7 (diff)
downloadportage-14128bb63cf7825520b08a1226132dd957809cc5.tar.gz
portage-14128bb63cf7825520b08a1226132dd957809cc5.tar.bz2
portage-14128bb63cf7825520b08a1226132dd957809cc5.zip
As a workaround for bug #185305, make quickpkg break hardlinks during creation of the archive.
svn path=/main/trunk/; revision=7526
-rw-r--r--pym/portage/dbapi/vartree.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index fd543d5cd..92f48337e 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -2192,6 +2192,7 @@ class dblink(object):
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)
@@ -2231,6 +2232,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.