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 1QcUwc-0004IZ-Ly for garchives@archives.gentoo.org; Fri, 01 Jul 2011 04:03:07 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 52DCD1C059; Fri, 1 Jul 2011 04:02:59 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 2299E1C059 for ; Fri, 1 Jul 2011 04:02:59 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id AD7081B404E for ; Fri, 1 Jul 2011 04:02:58 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id CE70E80040 for ; Fri, 1 Jul 2011 04:02:56 +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: 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: a30cc13e70baad6abf41224afadf4a91dd3eb828 Date: Fri, 1 Jul 2011 04:02:56 +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: 2db5a111e0cd862000454ee778920b77 commit: a30cc13e70baad6abf41224afadf4a91dd3eb828 Author: Zac Medico gentoo org> AuthorDate: Fri Jul 1 04:00:52 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Fri Jul 1 04:00:52 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3Da30cc13e preserve-libs: only preserve soname symlinks This avoids calling the LinkageMapELF.isMasterLink() method, since the only symlinks that are strictly required are the soname symlinks. --- pym/portage/dbapi/vartree.py | 26 +++++++++++++------------- 1 files changed, 13 insertions(+), 13 deletions(-) diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index b3e6f6a..5a86291 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -2461,25 +2461,25 @@ class dblink(object): =20 preserve_paths =3D set() for preserve_node in preserve_nodes: - # Make sure that at least one of the paths is not a symlink. - # This prevents symlinks from being erroneously preserved by - # themselves when the old instance installed symlinks that - # the new instance does not install. - have_lib =3D False + # Preserve the library itself, and also preserve the + # soname symlink which is the only symlink that is + # strictly required. + hardlinks =3D set() + soname_symlinks =3D set() + soname =3D linkmap.getSoname(next(iter(preserve_node.alt_paths))) for f in preserve_node.alt_paths: f_abs =3D os.path.join(root, f.lstrip(os.sep)) try: if stat.S_ISREG(os.lstat(f_abs).st_mode): - have_lib =3D True - break + hardlinks.add(f) + elif os.path.basename(f) =3D=3D soname: + soname_symlinks.add(f) except OSError: - continue + pass =20 - if have_lib: - # There's no point in preserving the "master" symlink, since - # the soname symlink is all that's strictly required. - preserve_paths.update(f for f in preserve_node.alt_paths - if not linkmap.isMasterLink(f)) + if hardlinks: + preserve_paths.update(hardlinks) + preserve_paths.update(soname_symlinks) =20 return preserve_paths =20