Bug 767403 - also match readelf case on *.so.* to fix *BSDs. r=glandium
authorLandry Breuil <landry@openbsd.org>
Tue, 26 Jun 2012 22:48:57 +0200
changeset 97722 c7b0713958d6dbcb7fd4b8c2c17c8f6b939d99aa
parent 97721 57127eda3007339392ca16239d8a3eefeff87479
child 97723 17a545fb6702c85e69a2801d8e1e4b7ace1a7383
push id22993
push useremorley@mozilla.com
push dateWed, 27 Jun 2012 10:31:27 +0000
treeherdermozilla-central@1a56f1f011c9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs767403
milestone16.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 767403 - also match readelf case on *.so.* to fix *BSDs. r=glandium
xpcom/stub/dependentlibs.py
--- a/xpcom/stub/dependentlibs.py
+++ b/xpcom/stub/dependentlibs.py
@@ -4,16 +4,17 @@
 
 '''Given a library, dependentlibs.py prints the list of libraries it depends
 upon that are in the same directory.
 '''
 
 from optparse import OptionParser
 import os
 import re
+import fnmatch
 import subprocess
 import sys
 
 TOOLCHAIN_PREFIX = ''
 
 def dependentlibs_dumpbin(lib):
     '''Returns the list of dependencies declared in the given DLL'''
     proc = subprocess.Popen(['dumpbin', '-imports', lib], stdout = subprocess.PIPE)
@@ -90,17 +91,17 @@ def main():
     (options, args) = parser.parse_args()
     if options.toolchain_prefix:
         global TOOLCHAIN_PREFIX
         TOOLCHAIN_PREFIX = options.toolchain_prefix
     lib = args[0]
     ext = os.path.splitext(lib)[1]
     if ext == '.dll':
         func = dependentlibs_dumpbin
-    elif ext == '.so':
+    elif ext == '.so' or fnmatch.fnmatch(lib, '*.so.*'):
         func = dependentlibs_readelf
     elif ext == '.dylib':
         func = dependentlibs_otool
     if not options.libpaths:
         options.libpaths = [os.path.dirname(lib)]
 
     print '\n'.join(dependentlibs(lib, options.libpaths, func))