bug 469814 - Nightly mac builds contain .dSYM bundles. do some better cleanup when building symbols. r=bsmedberg
authorTed Mielczarek <ted.mielczarek@gmail.com>
Wed, 24 Dec 2008 14:04:43 -0500
changeset 23045 30ee44d5158933ab05147567d1ff0bf771d68de8
parent 23044 3664a036f00ebf7abb2c89afa8f1f7ba36f67fcc
child 23046 73be1c836d7f066f200ad4565d74bbc9354d2689
push idunknown
push userunknown
push dateunknown
reviewersbsmedberg
bugs469814
milestone1.9.2a1pre
bug 469814 - Nightly mac builds contain .dSYM bundles. do some better cleanup when building symbols. r=bsmedberg
toolkit/crashreporter/tools/symbolstore.py
--- a/toolkit/crashreporter/tools/symbolstore.py
+++ b/toolkit/crashreporter/tools/symbolstore.py
@@ -686,17 +686,20 @@ class Dumper_Mac(Dumper):
         by dsymutil(1), so run dsymutil here and pass the bundle name
         down to the superclass method instead."""
         dsymbundle = file + ".dSYM"
         if os.path.exists(dsymbundle):
             shutil.rmtree(dsymbundle)
         # dsymutil takes --arch=foo instead of -a foo like everything else
         os.system("dsymutil %s %s >/dev/null" % (' '.join([a.replace('-a ', '--arch=') for a in self.archs]),
                                       file))
-        return Dumper.ProcessFile(self, dsymbundle)
+        res = Dumper.ProcessFile(self, dsymbundle)
+        if not self.copy_debug:
+            shutil.rmtree(dsymbundle)
+        return res
 
 # Entry point if called as a standalone program
 def main():
     parser = OptionParser(usage="usage: %prog [options] <dump_syms binary> <symbol store path> <debug info files>")
     parser.add_option("-c", "--copy",
                       action="store_true", dest="copy_debug", default=False,
                       help="Copy debug info files into the same directory structure as symbol files")
     parser.add_option("-a", "--archs",