Merge lp:~ronj/apport/betterErrorBox into lp:apport

Proposed by Ronan Jouchet on 2010-04-09
Status: Merged
Approved by: Martin Pitt on 2010-04-12
Approved revision: 1761
Merged at revision: 1996
Proposed branch: lp:~ronj/apport/betterErrorBox
Merge into: lp:apport
Diff against target: 25 lines (+9/-6)
1 file modified
apport/ (+9/-6)
To merge this branch: bzr merge lp:~ronj/apport/betterErrorBox
Reviewer Review Type Date Requested Status
Martin Pitt 2010-04-09 Approve on 2010-04-12
Review via email:

This proposal supersedes a proposal from 2010-04-09.

Description of the change

I just refactored the condition, separated the two cases, and made the UnreportableReason a bit more explicit.

I'm kinda new, please check the flow is correct and ensure I didn't break anything about localization.

To post a comment you must log in.
Martin Pitt (pitti) wrote :

This merge request was created twice. I'll use


review: Disapprove
Martin Pitt (pitti) wrote :

Whoops, the other was already marked as superseded, sorry.

This looks fine, but will be merged after Ubuntu 10.04 release (which is currently in string freeze).


review: Approve
Ronan Jouchet (ronj) wrote :

This is one of my first patches, the first version (1760) had missing colons.
I hope you really reviewed it in detail, I'm new to Python and while I'm happy to help, I don't want to break anything...

Martin Pitt (pitti) wrote :

Sorry, this fell off the radar. Merged into trunk now with some corrections. Thanks!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'apport/'
2--- apport/ 2010-03-31 14:19:05 +0000
3+++ apport/ 2010-04-09 16:25:39 +0000
4@@ -80,12 +80,15 @@
5 # check package origin; we do that after adding hooks, so that hooks have
6 # the chance to set a third-party CrashDB.
7 try:
8- if ('Package' not in report or \
9- not apport.packaging.is_distro_package(report['Package'].split()[0])) \
10- and 'CrashDB' not in report:
11- #TRANS: %s is the name of the operating system
12- report['UnreportableReason'] = _('This is not a genuine %s package') % \
13- report['DistroRelease'].split()[0]
14+ if 'CrashDB' not in report:
15+ if 'Package' not in report:
16+ report['UnreportableReason'] = _('This package does not seem to be installed correctly') % \
17+ report['DistroRelease'].split()[0]
18+ elif not apport.packaging.is_distro_package(report['Package'].split()[0]):
19+ #TRANS: %s is the name of the operating system
20+ report['UnreportableReason'] = _('This package does not come from %s \
21+official repositories. Please remove any PPA and try again.') % \
22+ report['DistroRelease'].split()[0]
23 except ValueError:
24 # this happens if we are collecting information on an uninstalled
25 # package


People subscribed via source and target branches