Merge lp:~redsingularity/apport/bugpattern-848739 into lp:~ubuntu-bugcontrol/apport/ubuntu-bugpatterns

Proposed by RedSingularity
Status: Rejected
Rejected by: Brian Murray
Proposed branch: lp:~redsingularity/apport/bugpattern-848739
Merge into: lp:~ubuntu-bugcontrol/apport/ubuntu-bugpatterns
Diff against target: 89 lines (+19/-39)
2 files modified
bugpatterns.xml (+6/-0)
test-local (+13/-39)
To merge this branch: bzr merge lp:~redsingularity/apport/bugpattern-848739
Reviewer Review Type Date Requested Status
Brian Murray Disapprove
Review via email: mp+75226@code.launchpad.net
To post a comment you must log in.
Brian Murray (brian-murray) wrote :

bug 848739 is actually a duplicate of bug 832745 but I'll fix this up.

Brian Murray (brian-murray) wrote :

And it looks like there is already a bug pattern for 832745 so I'm going to disapprove this and look into how 848739 got through. Thanks though!

review: Disapprove

Unmerged revisions

337. By Tim <tim@Alpha> on 2011-09-13

Added pattern for bug 848739.

336. By Tim <tim@Alpha> on 2011-09-13

Added Pattern for bug 848739.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bugpatterns.xml'
2--- bugpatterns.xml 2011-09-13 15:00:16 +0000
3+++ bugpatterns.xml 2011-09-13 17:10:25 +0000
4@@ -1992,6 +1992,12 @@
5 <re key="Traceback">TypeError: glib.markup_escape_text\(\) takes at most 1 argument \(2 given\)</re>
6 </pattern>
7
8+ <pattern url="https://launchpad.net/bugs/848739">
9+ <re key="Package">^update-manager </re>
10+ <re key="Title">update-manager crashed with TypeError in confirmChanges\(\): glib.markup_escape_text\(\) takes at most 1 argument \(2 given\)</re>
11+ <re key="Traceback">TypeError: glib.markup_escape_text\(\) takes at most 1 argument \(2 given\)</re>
12+ </pattern>
13+
14 <!-- Converted from update-notifier.xml -->
15
16 <pattern url="https://launchpad.net/bugs/403192">
17
18=== modified file 'test-local'
19--- test-local 2011-09-12 18:19:23 +0000
20+++ test-local 2011-09-13 17:10:25 +0000
21@@ -4,25 +4,16 @@
22
23 import apport
24 from apport.crashdb import get_crashdb
25-from launchpadlib.launchpad import Launchpad
26-
27-def match_bug(bugnumber):
28- db = get_crashdb(None)
29- report = db.download(bugnumber)
30- match = report.search_bug_patterns('bugpatterns.xml')
31-
32- if match:
33- print 'LP: #%s: Matched bug pattern: %s' % (bugnumber, match )
34- else:
35- print 'LP: #%s: No match' % bugnumber
36-
37-lp = Launchpad.login_anonymously('apport', 'production')
38
39 if len(sys.argv) != 2:
40 print >> sys.stderr, 'Usage: %s <.crash file or bug number>' % sys.argv[0]
41 sys.exit(1)
42
43-if not sys.argv[1].isdigit():
44+if sys.argv[1].isdigit():
45+ db = get_crashdb(None)
46+ report = db.download(sys.argv[1])
47+ #report.write(open('/tmp/report.crash', 'w'))
48+else:
49 report = apport.Report()
50 try:
51 f = open(sys.argv[1])
52@@ -31,29 +22,12 @@
53 sys.exit(1)
54 report.load(f)
55 f.close()
56- match = report.search_bug_patterns('bugpatterns.xml')
57-
58- if match:
59- print 'LP: #%s: Matched bug pattern: %s' % ( sys.argv[1], match )
60- sys.exit(0)
61- else:
62- print 'LP: #%s: No match' % sys.argv[1]
63- sys.exit(1)
64-else:
65- match_bug(sys.argv[1])
66-
67- bug = lp.bugs[sys.argv[1]]
68- # if bug is a duplicate - call this for parent
69- if bug.duplicate_of:
70- dupe = bug.duplicate_of.id
71- print 'LP: #%s is a duplicate of ....' % bug.id
72- match_bug(dupe)
73- if bug.duplicates:
74- print "Checking duplicate bugs..."
75- for duplicate in bug.duplicates:
76- # Skip if not an apport bug
77- if 'apport-crash' in duplicate.tags or \
78- 'apport-package' in duplicate.tags:
79- match_bug(duplicate.id)
80-
81+
82+match = report.search_bug_patterns('.')
83+
84+if match:
85+ print 'LP: #%s: Matched bug pattern: %s' % ( sys.argv[1], match )
86 sys.exit(0)
87+else:
88+ print 'LP: #%s: No match' % sys.argv[1]
89+ sys.exit(1)