Thomas Heller added the comment:

This is an experimental patch (solaris.patch).  Can you please proofread
it and try it out on the solaris machine?

_____________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1777530>
_____________________________________
Index: util.py
===================================================================
--- util.py	(revision 57552)
+++ util.py	(working copy)
@@ -70,11 +70,18 @@
         # assuming GNU binutils / ELF
         if not f:
             return None
-        cmd = "objdump -p -j .dynamic 2>/dev/null " + f
-        res = re.search(r'\sSONAME\s+([^\s]+)', os.popen(cmd).read())
-        if not res:
-            return None
-        return res.group(1)
+        if sys.platform.startswith("solaris"):
+            cmd = "elfdump -d 2>/dev/null " + f
+            res = re.search(r'\sSONAME\s+([^\s]+)\s+([^\s]+)', os.popen(cmd).read())
+            if not res:
+                return None
+            return res.group(2)
+        else:
+            cmd = "objdump -p -j .dynamic 2>/dev/null " + f
+            res = re.search(r'\sSONAME\s+([^\s]+)', os.popen(cmd).read())
+            if not res:
+                return None
+            return res.group(1)
 
     if (sys.platform.startswith("freebsd")
         or sys.platform.startswith("openbsd")
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to