Gentoo Archives: gentoo-commits

From: Fabian Groffen <grobian@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:prefix commit in: lib/portage/util/_dyn_libs/
Date: Mon, 07 Jan 2019 10:23:01
Message-Id: 1546856344.626b15b139203091a8159dd968026b330f8ce4a9.grobian@gentoo
1 commit: 626b15b139203091a8159dd968026b330f8ce4a9
2 Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jan 7 10:19:04 2019 +0000
4 Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
5 CommitDate: Mon Jan 7 10:19:04 2019 +0000
6 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=626b15b1
7
8 lib/portage/util/_dyn_libs/LinkageMapMachO: fix getSoname
9
10 Make getSoname return what LinkageMapELF would return: the basename
11 only. We need this to have the logic in vartree to work on Darwin when
12 preserving the soname symlinks. The recent libreadline major update
13 revealed that the install_name symlink was actually not preserved
14 causing system-wide breakage.
15
16 Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
17
18 lib/portage/util/_dyn_libs/LinkageMapMachO.py | 14 ++++++++------
19 1 file changed, 8 insertions(+), 6 deletions(-)
20
21 diff --git a/lib/portage/util/_dyn_libs/LinkageMapMachO.py b/lib/portage/util/_dyn_libs/LinkageMapMachO.py
22 index 5cfbadb6d..933ce02c1 100644
23 --- a/lib/portage/util/_dyn_libs/LinkageMapMachO.py
24 +++ b/lib/portage/util/_dyn_libs/LinkageMapMachO.py
25 @@ -1,4 +1,4 @@
26 -# Copyright 1998-2017 Gentoo Foundation
27 +# Copyright 1998-2019 Gentoo Authors
28 # Distributed under the terms of the GNU General Public License v2
29
30 import errno
31 @@ -490,7 +490,7 @@ class LinkageMapMachO(object):
32 """
33 Determine whether an object is a "master" symlink, which means
34 that its basename is the same as the beginning part of the
35 - soname and it lacks the soname's version component.
36 + install_name and it lacks the install_name's version component.
37
38 Examples:
39
40 @@ -569,12 +569,13 @@ class LinkageMapMachO(object):
41
42 def getSoname(self, obj):
43 """
44 - Return the soname associated with an object.
45 + Return the install_name associated with an object. To match
46 + soname behaviour, the leading path is stripped.
47
48 @param obj: absolute path to an object
49 @type obj: string (example: '/usr/bin/bar')
50 @rtype: string
51 - @return: soname as a string
52 + @return: install_name basename as a string
53
54 """
55 if not self._libs:
56 @@ -583,10 +584,11 @@ class LinkageMapMachO(object):
57 obj_key = obj
58 if obj_key not in self._obj_properties:
59 raise KeyError("%s not in object list" % obj_key)
60 - return self._obj_properties[obj_key].install_name
61 + return os.path.basename(self._obj_properties[obj_key].install_name)
62 if obj not in self._obj_key_cache:
63 raise KeyError("%s not in object list" % obj)
64 - return self._obj_properties[self._obj_key_cache[obj]].install_name
65 + return os.path.basename(
66 + self._obj_properties[self._obj_key_cache[obj]].install_name)
67
68 def findProviders(self, obj):
69 """