From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1RK1Zk-0005lt-IQ for garchives@archives.gentoo.org; Sat, 29 Oct 2011 05:35:24 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8EAB4E011A; Sat, 29 Oct 2011 05:35:17 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 621D2E011A for ; Sat, 29 Oct 2011 05:35:17 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id D33C61B401F for ; Sat, 29 Oct 2011 05:35:16 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 11EA180042 for ; Sat, 29 Oct 2011 05:35:16 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <290990af18d2c56c26bb4b33f24e641948879522.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/dbapi/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/dbapi/vartree.py X-VCS-Directories: pym/portage/dbapi/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 290990af18d2c56c26bb4b33f24e641948879522 Date: Sat, 29 Oct 2011 05:35:16 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 337eba99ed4b04658725c379aa00bceb commit: 290990af18d2c56c26bb4b33f24e641948879522 Author: Zac Medico gentoo org> AuthorDate: Sat Oct 29 05:35:01 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Sat Oct 29 05:35:01 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3D290990af quickpkg: fix regression in hardlink support Hardlink support has been broken since commit 4198da0184aaec30c41f2e5d2c7af71c4d35b662, which omitted the hardlink logic from TarFile.gettarinfo(). --- pym/portage/dbapi/vartree.py | 13 +++++++++++-- 1 files changed, 11 insertions(+), 2 deletions(-) diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index ee0db6f..73772b0 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -4560,11 +4560,20 @@ def tar_contents(contents, root, tar, protect=3DN= one, onProgress=3DNone): tarinfo.mode =3D lst.st_mode tarinfo.uid =3D lst.st_uid tarinfo.gid =3D lst.st_gid - tarinfo.size =3D lst.st_size + tarinfo.size =3D 0 tarinfo.mtime =3D lst.st_mtime tarinfo.linkname =3D "" if stat.S_ISREG(lst.st_mode): - tarinfo.type =3D tarfile.REGTYPE + inode =3D (lst.st_ino, lst.st_dev) + if (lst.st_nlink > 1 and + inode in tar.inodes and + arcname !=3D tar.inodes[inode]): + tarinfo.type =3D tarfile.LNKTYPE + tarinfo.linkname =3D tar.inodes[inode] + else: + tar.inodes[inode] =3D arcname + tarinfo.type =3D tarfile.REGTYPE + tarinfo.size =3D lst.st_size elif stat.S_ISDIR(lst.st_mode): tarinfo.type =3D tarfile.DIRTYPE elif stat.S_ISLNK(lst.st_mode):