Merge lp:~brian-murray/ubuntu/oneiric/apport/unreportable-pkg-conflict into lp:~ubuntu-core-dev/ubuntu/oneiric/apport/ubuntu

Proposed by Brian Murray
Status: Merged
Merged at revision: 1814
Proposed branch: lp:~brian-murray/ubuntu/oneiric/apport/unreportable-pkg-conflict
Merge into: lp:~ubuntu-core-dev/ubuntu/oneiric/apport/ubuntu
Diff against target: 30 lines (+11/-1)
2 files modified
data/general-hooks/ubuntu.py (+4/-1)
debian/changelog (+7/-0)
To merge this branch: bzr merge lp:~brian-murray/ubuntu/oneiric/apport/unreportable-pkg-conflict
Reviewer Review Type Date Requested Status
Kees Cook Approve
Review via email: mp+71264@code.launchpad.net

Description of the change

From the better apport package bug reports blue print:

[brian-murray] parse conflicting package out of log, refuse bug filing if that isn't an Ubuntu package: TODO

To post a comment you must log in.
Revision history for this message
Kees Cook (kees) wrote :

conflict_pkg is a Match object. You probably want, for line 10:

if conflict_pkg and not apport.packaging.is_distro_package(conflict_pkg.group(1)):

review: Needs Fixing
1815. By Brian Murray

fix logic error

1816. By Brian Murray

use the add_tag function for adding package-conflict as a tag

Revision history for this message
Kees Cook (kees) wrote :

Looks great to me, thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'data/general-hooks/ubuntu.py'
2--- data/general-hooks/ubuntu.py 2011-08-10 16:09:33 +0000
3+++ data/general-hooks/ubuntu.py 2011-08-12 03:16:22 +0000
4@@ -82,7 +82,10 @@
5 dupe_sig += line
6 if 'dpkg: error' in dupe_sig and line.startswith(' '):
7 if 'trying to overwrite' in line:
8- report['Tags'] += 'package-conflict'
9+ conflict_pkg = re.search('in package (.*) ', line)
10+ if conflict_pkg and not apport.packaging.is_distro_package(conflict_pkg.group(1)):
11+ report['UnreportableReason'] = _('An Ubuntu package has a file conflict with a package that is not a genuine Ubuntu package')
12+ add_tag(report, 'package-conflict')
13 if 'Setting up' in dupe_sig or 'Unpacking' in dupe_sig:
14 report['DuplicateSignature'] = dupe_sig
15 # the duplicate signature should be the first failure
16
17=== modified file 'debian/changelog'
18--- debian/changelog 2011-08-10 18:02:08 +0000
19+++ debian/changelog 2011-08-12 03:16:22 +0000
20@@ -1,3 +1,10 @@
21+apport (1.21.2-0ubuntu13) oneiric; urgency=low
22+
23+ * data/general-hooks/ubuntu.py: do not report package installation failures
24+ where the conflicting package is not a genuine Ubuntu package
25+
26+ -- Brian Murray <brian@ubuntu.com> Thu, 11 Aug 2011 12:40:11 -0700
27+
28 apport (1.21.2-0ubuntu12) oneiric; urgency=low
29
30 * Merge change from trunk:

Subscribers

People subscribed via source and target branches