diff -u apport-1.20.1/debian/changelog apport-1.20.1/debian/changelog --- apport-1.20.1/debian/changelog +++ apport-1.20.1/debian/changelog @@ -1,3 +1,14 @@ +apport (1.20.1-0ubuntu5.1) natty-proposed; urgency=low + + * Include bug fixes from upstream + - report.py: Fix bug patterns to correctly match against compressed report + (LP: #814729) + - generic hook: Don't report package installation failures due to + segfaulting maintainer scripts. We want the actual crash report only. + (LP: #814727) + + -- Brian Murray Fri, 29 Jul 2011 10:45:59 -0700 + apport (1.20.1-0ubuntu5) natty; urgency=low [ Kees Cook ] only in patch2: unchanged: --- apport-1.20.1.orig/apport/report.py +++ apport-1.20.1/apport/report.py @@ -15,7 +15,7 @@ import xml.dom, xml.dom.minidom from xml.parsers.expat import ExpatError -from problem_report import ProblemReport +import problem_report import apport import apport.fileutils from apport.packaging_impl import impl as packaging @@ -108,7 +108,10 @@ c.childNodes[0].nodeType == xml.dom.Node.TEXT_NODE: regexp = c.childNodes[0].nodeValue.encode('UTF-8') try: - if not re.search(regexp, report[key]): + v = report[key] + if isinstance(v, problem_report.CompressedValue): + v = v.get_value() + if not re.search(regexp, v): return None except: return None @@ -142,7 +145,7 @@ # Report class # -class Report(ProblemReport): +class Report(problem_report.ProblemReport): '''A problem report specific to apport (crash or bug). This class wraps a standard ProblemReport and adds methods for collecting @@ -157,7 +160,7 @@ If the report is attached to a process ID, this should be set in self.pid, so that e. g. hooks can use it to collect additional data. ''' - ProblemReport.__init__(self, type, date) + problem_report.ProblemReport.__init__(self, type, date) self.pid = None def _pkg_modified_suffix(self, package): @@ -1773,6 +1776,11 @@ self.assertEqual(r_coreutils.search_bug_patterns(patterns.name), 'http://bugtracker.net/bugs/3') self.assertEqual(r_bazaar.search_bug_patterns(patterns.name), 'http://bugtracker.net/bugs/5') + # also works for CompressedValues + r_bash_compressed = r_bash.copy() + r_bash_compressed['Foo'] = problem_report.CompressedValue('bazaar') + self.assertEqual(r_bash_compressed.search_bug_patterns(patterns.name), 'http://bugtracker.net/bugs/1') + # negative match cases r_bash['Package'] = 'bash-static 1-2' self.assertEqual(r_bash.search_bug_patterns(patterns.name), None) only in patch2: unchanged: --- apport-1.20.1.orig/data/general-hooks/generic.py +++ apport-1.20.1/data/general-hooks/generic.py @@ -72,6 +72,10 @@ if '/usr/lib/libGL.so' in (report.get('StacktraceTop') or '\n').splitlines()[0] \ and 'Loading extension GLX' not in apport.hookutils.read_file('/var/log/Xorg.0.log'): report['UnreportableReason'] = 'The X.org server does not support the GLX extension, which the crashed program expected to use.' + # filter out package install failures due to a segfault + if 'Segmentation fault' in report.get('ErrorMessage', '') \ + and report['ProblemType'] == 'Package': + report['UnreportableReason'] = 'The package installation resulted in a segmentation fault which is better reported as a crash report rather than a package install failure.' if __name__ == '__main__':