From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id B5366138335 for ; Mon, 7 Jan 2019 10:23:01 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 75A7FE09EA; Mon, 7 Jan 2019 10:22:59 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 4BFB9E09EA for ; Mon, 7 Jan 2019 10:22:59 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id D6396335CFF for ; Mon, 7 Jan 2019 10:22:57 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 4ED234E3 for ; Mon, 7 Jan 2019 10:22:55 +0000 (UTC) From: "Fabian Groffen" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Fabian Groffen" Message-ID: <1546856344.626b15b139203091a8159dd968026b330f8ce4a9.grobian@gentoo> Subject: [gentoo-commits] proj/portage:prefix commit in: lib/portage/util/_dyn_libs/ X-VCS-Repository: proj/portage X-VCS-Files: lib/portage/util/_dyn_libs/LinkageMapMachO.py X-VCS-Directories: lib/portage/util/_dyn_libs/ X-VCS-Committer: grobian X-VCS-Committer-Name: Fabian Groffen X-VCS-Revision: 626b15b139203091a8159dd968026b330f8ce4a9 X-VCS-Branch: prefix Date: Mon, 7 Jan 2019 10:22:55 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: f87eda0e-1691-47c6-aebd-fadb3b1d5482 X-Archives-Hash: 2f66b4b3d17aaf9201fe840beb1ea652 commit: 626b15b139203091a8159dd968026b330f8ce4a9 Author: Fabian Groffen gentoo org> AuthorDate: Mon Jan 7 10:19:04 2019 +0000 Commit: Fabian Groffen gentoo org> CommitDate: Mon Jan 7 10:19:04 2019 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=626b15b1 lib/portage/util/_dyn_libs/LinkageMapMachO: fix getSoname Make getSoname return what LinkageMapELF would return: the basename only. We need this to have the logic in vartree to work on Darwin when preserving the soname symlinks. The recent libreadline major update revealed that the install_name symlink was actually not preserved causing system-wide breakage. Signed-off-by: Fabian Groffen gentoo.org> lib/portage/util/_dyn_libs/LinkageMapMachO.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/portage/util/_dyn_libs/LinkageMapMachO.py b/lib/portage/util/_dyn_libs/LinkageMapMachO.py index 5cfbadb6d..933ce02c1 100644 --- a/lib/portage/util/_dyn_libs/LinkageMapMachO.py +++ b/lib/portage/util/_dyn_libs/LinkageMapMachO.py @@ -1,4 +1,4 @@ -# Copyright 1998-2017 Gentoo Foundation +# Copyright 1998-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 import errno @@ -490,7 +490,7 @@ class LinkageMapMachO(object): """ Determine whether an object is a "master" symlink, which means that its basename is the same as the beginning part of the - soname and it lacks the soname's version component. + install_name and it lacks the install_name's version component. Examples: @@ -569,12 +569,13 @@ class LinkageMapMachO(object): def getSoname(self, obj): """ - Return the soname associated with an object. + Return the install_name associated with an object. To match + soname behaviour, the leading path is stripped. @param obj: absolute path to an object @type obj: string (example: '/usr/bin/bar') @rtype: string - @return: soname as a string + @return: install_name basename as a string """ if not self._libs: @@ -583,10 +584,11 @@ class LinkageMapMachO(object): obj_key = obj if obj_key not in self._obj_properties: raise KeyError("%s not in object list" % obj_key) - return self._obj_properties[obj_key].install_name + return os.path.basename(self._obj_properties[obj_key].install_name) if obj not in self._obj_key_cache: raise KeyError("%s not in object list" % obj) - return self._obj_properties[self._obj_key_cache[obj]].install_name + return os.path.basename( + self._obj_properties[self._obj_key_cache[obj]].install_name) def findProviders(self, obj): """