Merge lp:~ronj/apport/betterErrorBox into lp:~apport-hackers/apport/trunk

Proposed by Ronan Jouchet
Status: Superseded
Proposed branch: lp:~ronj/apport/betterErrorBox
Merge into: lp:~apport-hackers/apport/trunk
Diff against target: 25 lines (+9/-6)
1 file modified
apport/ui.py (+9/-6)
To merge this branch: bzr merge lp:~ronj/apport/betterErrorBox
Reviewer Review Type Date Requested Status
Apport upstream developers Pending
Review via email: mp+23115@code.launchpad.net

This proposal has been superseded by a proposal from 2010-04-09.

Commit message

#559345: Give a more explicit message when ubuntu-bug decides a package is "not a genuine Ubuntu package"

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.
lp:~ronj/apport/betterErrorBox updated
1761. By Ronan Jouchet

syntax fix

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'apport/ui.py'
2--- apport/ui.py 2010-03-31 14:19:05 +0000
3+++ apport/ui.py 2010-04-09 15:47:19 +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

Subscribers

People subscribed via source and target branches