implement missing getSoname function in LinkageMapMachO, thanks calculus for testing...
authorFabian Groffen <grobian@gentoo.org>
Mon, 28 Jul 2008 20:26:09 +0000 (20:26 -0000)
committerFabian Groffen <grobian@gentoo.org>
Mon, 28 Jul 2008 20:26:09 +0000 (20:26 -0000)
svn path=/main/branches/prefix/; revision=11248

pym/portage/dbapi/vartree.py

index 1f8ee15f8e2af36f960c2f234866afaaa27128c5..53285329bc22c5ec68332fdb673de2e3901be046 100644 (file)
@@ -384,6 +384,16 @@ class LinkageMapMachO(object):
                        rValue.extend(self._libs[install_name]["providers"])
                return rValue
        
+       def getSoname(self, obj):
+               if not self._libs:
+                       self.rebuild()
+               if obj not in self._obj_properties:
+                       obj = realpath(obj)
+                       if obj not in self._obj_properties:
+                               raise KeyError("%s not in object list" % obj)
+               install_name = self._obj_properties[obj][1]
+               return install_name
+
        # the missing documentation, part X.
        # This function appears to return all (valid) providers for all
        # needed entries that the given object has.