summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorbrad kittenbrink <brad@lindenlab.com>2010-06-03 13:55:03 -0700
committerbrad kittenbrink <brad@lindenlab.com>2010-06-03 13:55:03 -0700
commit792b9d38cbf5fc5d03339c255a13912fa85bee51 (patch)
tree139a1f080459ca1954295fcbfdab1ad7f9d7f97f /indra/newview
parent5d68254c58e0a63086ea2e9a547ff5dd67300a12 (diff)
Added extra error checking to generate_breakpad_symbols.py
so the failure in copy_l_viewer_manifest (fixed in changeset 4ae8723c7d33) won't be so silent in the future.
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/generate_breakpad_symbols.py25
1 files changed, 24 insertions, 1 deletions
diff --git a/indra/newview/generate_breakpad_symbols.py b/indra/newview/generate_breakpad_symbols.py
index 3a5f34a5c3..21db9ce152 100644
--- a/indra/newview/generate_breakpad_symbols.py
+++ b/indra/newview/generate_breakpad_symbols.py
@@ -37,6 +37,7 @@ import fnmatch
import itertools
import os
import sys
+import shlex
import subprocess
import tarfile
import StringIO
@@ -44,11 +45,27 @@ import StringIO
def usage():
print >>sys.stderr, "usage: %s viewer_dir viewer_exes libs_suffix dump_syms_tool viewer_symbol_file" % sys.argv[0]
+class MissingModuleError(Exception):
+ def __init__(self, modules):
+ Exception.__init__(self, "Failed to find required modules: %r" % modules)
+ self.modules = modules
+
def main(viewer_dir, viewer_exes, libs_suffix, dump_syms_tool, viewer_symbol_file):
# print "generate_breakpad_symbols: %s" % str((viewer_dir, viewer_exes, libs_suffix, dump_syms_tool, viewer_symbol_file))
+ # split up list of viewer_exes
+ # "'Second Life' SLPlugin" becomes ['Second Life', 'SLPlugin']
+ viewer_exes = shlex.split(viewer_exes)
+
+ found_required = dict()
+ for required in viewer_exes:
+ found_required[required] = False
+
def matches(f):
- return f in viewer_exes or fnmatch.fnmatch(f, libs_suffix)
+ if f in viewer_exes:
+ found_required[f] = True
+ return True
+ return fnmatch.fnmatch(f, libs_suffix)
def list_files():
for (dirname, subdirs, filenames) in os.walk(viewer_dir):
@@ -81,6 +98,12 @@ def main(viewer_dir, viewer_exes, libs_suffix, dump_syms_tool, viewer_symbol_fil
else:
print >>sys.stderr, "warning: failed to dump symbols for '%s': %s" % (filename, err)
+ missing_modules = [m for (m,_) in
+ itertools.ifilter(lambda (k,v): not v, found_required.iteritems())
+ ]
+ if missing_modules:
+ raise MissingModuleError(missing_modules)
+
out.close()
return 0