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
=== modified file 'data/general-hooks/ubuntu.py'
--- data/general-hooks/ubuntu.py 2011-08-10 16:09:33 +0000
+++ data/general-hooks/ubuntu.py 2011-08-12 03:16:22 +0000
@@ -82,7 +82,10 @@
82 dupe_sig += line82 dupe_sig += line
83 if 'dpkg: error' in dupe_sig and line.startswith(' '):83 if 'dpkg: error' in dupe_sig and line.startswith(' '):
84 if 'trying to overwrite' in line:84 if 'trying to overwrite' in line:
85 report['Tags'] += 'package-conflict'85 conflict_pkg = re.search('in package (.*) ', line)
86 if conflict_pkg and not apport.packaging.is_distro_package(conflict_pkg.group(1)):
87 report['UnreportableReason'] = _('An Ubuntu package has a file conflict with a package that is not a genuine Ubuntu package')
88 add_tag(report, 'package-conflict')
86 if 'Setting up' in dupe_sig or 'Unpacking' in dupe_sig:89 if 'Setting up' in dupe_sig or 'Unpacking' in dupe_sig:
87 report['DuplicateSignature'] = dupe_sig90 report['DuplicateSignature'] = dupe_sig
88 # the duplicate signature should be the first failure91 # the duplicate signature should be the first failure
8992
=== modified file 'debian/changelog'
--- debian/changelog 2011-08-10 18:02:08 +0000
+++ debian/changelog 2011-08-12 03:16:22 +0000
@@ -1,3 +1,10 @@
1apport (1.21.2-0ubuntu13) oneiric; urgency=low
2
3 * data/general-hooks/ubuntu.py: do not report package installation failures
4 where the conflicting package is not a genuine Ubuntu package
5
6 -- Brian Murray <brian@ubuntu.com> Thu, 11 Aug 2011 12:40:11 -0700
7
1apport (1.21.2-0ubuntu12) oneiric; urgency=low8apport (1.21.2-0ubuntu12) oneiric; urgency=low
29
3 * Merge change from trunk:10 * Merge change from trunk:

Subscribers

People subscribed via source and target branches