From 4951d8d694433995b382088cb36af7aa800719b7 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Thu, 30 Jun 2011 18:33:22 -0700 Subject: [PATCH] LinkageMapElf.isMasterLink(): handle libproc The version component of the libproc-3.2.8.so soname is formed slightly differently than most other libraries. --- pym/portage/util/_dyn_libs/LinkageMapELF.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pym/portage/util/_dyn_libs/LinkageMapELF.py b/pym/portage/util/_dyn_libs/LinkageMapELF.py index 4b9817e56..c56caae18 100644 --- a/pym/portage/util/_dyn_libs/LinkageMapELF.py +++ b/pym/portage/util/_dyn_libs/LinkageMapELF.py @@ -485,6 +485,13 @@ class LinkageMapELF(object): that its basename is the same as the beginning part of the soname and it lacks the soname's version component. + Examples: + + soname | master symlink name + -------------------------------------------- + libarchive.so.2.8.4 | libarchive.so + libproc-3.2.8.so | libproc.so + @param obj: absolute path to an object @type obj: string (example: '/usr/bin/foo') @rtype: Boolean @@ -499,7 +506,9 @@ class LinkageMapELF(object): raise KeyError("%s (%s) not in object list" % (obj_key, obj)) basename = os.path.basename(obj) soname = self._obj_properties[obj_key][3] - return len(basename) < len(soname) and soname.startswith(basename) + return len(basename) < len(soname) and \ + basename.endswith(".so") and \ + soname.startswith(basename[:-3]) def listLibraryObjects(self): """ -- 2.26.2