← Back to team overview

apport-hackers team mailing list archive

[Merge] lp:~brian-murray/apport/no-check-bug-pattern into lp:apport

 

Brian Murray has proposed merging lp:~brian-murray/apport/no-check-bug-pattern into lp:apport.

Requested reviews:
  Apport upstream developers (apport-hackers)

For more details, see:
https://code.launchpad.net/~brian-murray/apport/no-check-bug-pattern/+merge/250676

It doesn't really seem useful to check the bug patterns for a bug report when we aren't sending the crash report to Launchpad i.e. for Stable Releases of Ubuntu. Subsequently, we should check to see if self.crashdb.accepts(self.report) is True before starting the bug pattern checking process.
-- 
Your team Apport upstream developers is requested to review the proposed merge of lp:~brian-murray/apport/no-check-bug-pattern into lp:apport.
=== modified file 'apport/ui.py'
--- apport/ui.py	2015-02-10 10:29:30 +0000
+++ apport/ui.py	2015-02-23 20:38:44 +0000
@@ -1044,8 +1044,12 @@
                     on_finished()
                 return
 
-            # check bug patterns
-            if self.report.get('ProblemType') == 'KernelCrash' or self.report.get('ProblemType') == 'KernelOops' or 'Package' in self.report:
+            # check bug patterns only if the crash db will accept
+            # the report
+            if (self.report.get('ProblemType') == 'KernelCrash' or \
+                    self.report.get('ProblemType') == 'KernelOops' \
+                    or 'Package' in self.report) and \
+                    self.crashdb.accepts(self.report):
                 bpthread = apport.REThread.REThread(target=self.report.search_bug_patterns,
                                                     args=(self.crashdb.get_bugpattern_baseurl(),))
                 bpthread.start()
@@ -1059,8 +1063,10 @@
                 if bpthread.return_value():
                     self.report['_KnownReport'] = bpthread.return_value()
 
-            # check crash database if problem is known
-            if self.report.get('ProblemType') != 'Bug':
+            # check crash database if problem is known only if the crash db
+            # will accept the report
+            if self.report.get('ProblemType') != 'Bug' and \
+                    self.crashdb.accepts(self.report):
                 known_thread = apport.REThread.REThread(target=self.crashdb.known,
                                                         args=(self.report,))
                 known_thread.start()