public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/portage:prefix commit in: lib/portage/util/_dyn_libs/
@ 2019-01-07 10:22 Fabian Groffen
  0 siblings, 0 replies; 3+ messages in thread
From: Fabian Groffen @ 2019-01-07 10:22 UTC (permalink / raw
  To: gentoo-commits

commit:     626b15b139203091a8159dd968026b330f8ce4a9
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Mon Jan  7 10:19:04 2019 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> 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 <grobian <AT> 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):
 		"""


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] proj/portage:prefix commit in: lib/portage/util/_dyn_libs/
@ 2019-01-12  9:08 Fabian Groffen
  0 siblings, 0 replies; 3+ messages in thread
From: Fabian Groffen @ 2019-01-12  9:08 UTC (permalink / raw
  To: gentoo-commits

commit:     d5ca328072faef047eb6369fcbb225db6766528f
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 12 09:07:45 2019 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Sat Jan 12 09:07:45 2019 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=d5ca3280

LinkageMapMachO: ensure availability of 'os'

Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>

 lib/portage/util/_dyn_libs/LinkageMapMachO.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/portage/util/_dyn_libs/LinkageMapMachO.py b/lib/portage/util/_dyn_libs/LinkageMapMachO.py
index 933ce02c1..e74f0c5ba 100644
--- a/lib/portage/util/_dyn_libs/LinkageMapMachO.py
+++ b/lib/portage/util/_dyn_libs/LinkageMapMachO.py
@@ -578,6 +578,7 @@ class LinkageMapMachO(object):
 		@return: install_name basename as a string
 
 		"""
+		os = _os_merge
 		if not self._libs:
 			self.rebuild()
 		if isinstance(obj, self._ObjectKey):


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] proj/portage:prefix commit in: lib/portage/util/_dyn_libs/
@ 2023-11-25 19:08 Fabian Groffen
  0 siblings, 0 replies; 3+ messages in thread
From: Fabian Groffen @ 2023-11-25 19:08 UTC (permalink / raw
  To: gentoo-commits

commit:     f9d2e080062ac2309f1cb231cc9547e9bf4412ef
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 25 19:08:14 2023 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Sat Nov 25 19:08:14 2023 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=f9d2e080

lib/portage/util/_dyn_libs/meson.build: add LinkageMapMachO.py

Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>

 lib/portage/util/_dyn_libs/meson.build | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/portage/util/_dyn_libs/meson.build b/lib/portage/util/_dyn_libs/meson.build
index f744d2a087..705b51d220 100644
--- a/lib/portage/util/_dyn_libs/meson.build
+++ b/lib/portage/util/_dyn_libs/meson.build
@@ -1,6 +1,7 @@
 py.install_sources(
     [
         'LinkageMapELF.py',
+        'LinkageMapMachO.py',   # PREFIX_LOCAL
         'NeededEntry.py',
         'PreservedLibsRegistry.py',
         'display_preserved_libs.py',


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-11-25 19:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-07 10:22 [gentoo-commits] proj/portage:prefix commit in: lib/portage/util/_dyn_libs/ Fabian Groffen
  -- strict thread matches above, loose matches on Subject: below --
2019-01-12  9:08 Fabian Groffen
2023-11-25 19:08 Fabian Groffen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox