apport-hackers team mailing list archive
-
apport-hackers team
-
Mailing list archive
-
Message #00194
[Merge] lp:~brian-murray/apport/recoverable-problem-dupesig into lp:apport
Brian Murray has proposed merging lp:~brian-murray/apport/recoverable-problem-dupesig into lp:apport.
Requested reviews:
Apport upstream developers (apport-hackers)
Related bugs:
Bug #1316763 in Daisy: "bucketing of recoverable problems is done poorly"
https://bugs.launchpad.net/daisy/+bug/1316763
For more details, see:
https://code.launchpad.net/~brian-murray/apport/recoverable-problem-dupesig/+merge/256395
Really create a better duplicate signature using ExecutablePath fixing bug 1316763.
--
Your team Apport upstream developers is requested to review the proposed merge of lp:~brian-murray/apport/recoverable-problem-dupesig into lp:apport.
=== modified file 'data/recoverable_problem'
--- data/recoverable_problem 2014-10-13 20:32:11 +0000
+++ data/recoverable_problem 2015-04-15 20:43:11 +0000
@@ -62,10 +62,9 @@
report.add_user_info()
ds = report.get('DuplicateSignature', '')
- package = report.get('Package', '')
- if package and ds:
- package = package.split()[0]
- report['DuplicateSignature'] = '%s:%s' % (package, ds)
+ exec_path = report.get('ExecutablePath', '')
+ if exec_path and ds:
+ report['DuplicateSignature'] = '%s:%s' % (exec_path, ds)
# Write the final report
with open(apport.fileutils.make_report_path(report), 'wb') as fp:
=== modified file 'test/test_recoverable_problem.py'
--- test/test_recoverable_problem.py 2014-05-14 20:58:42 +0000
+++ test/test_recoverable_problem.py 2015-04-15 20:43:11 +0000
@@ -59,14 +59,16 @@
self.assertTrue('Pid:\t%d' % os.getpid() in report['ProcStatus'])
def test_recoverable_problem_dupe_sig(self):
- '''recoverable_problem duplicate signature includes package'''
+ '''recoverable_problem duplicate signature includes ExecutablePath'''
self.call_recoverable_problem('Package\0test\0DuplicateSignature\0ds')
path = self.wait_for_report()
with open(path, 'rb') as report_path:
report = apport.report.Report()
report.load(report_path)
- self.assertEqual(report['DuplicateSignature'], 'test:ds')
+ exec_path = report.get('ExecutablePath')
+ self.assertEqual(report['DuplicateSignature'], '%s:ds' %
+ (exec_path))
self.assertTrue('Pid:\t%d' % os.getpid() in report['ProcStatus'])
def test_invalid_data(self):