Merge lp:~brian-murray/apport/kernel-package-version into lp:~apport-hackers/apport/trunk

Proposed by Brian Murray
Status: Merged
Merged at revision: 2799
Proposed branch: lp:~brian-murray/apport/kernel-package-version
Merge into: lp:~apport-hackers/apport/trunk
Diff against target: 89 lines (+29/-6)
5 files modified
apport/hookutils.py (+1/-1)
data/apportcheckresume (+7/-1)
data/iwlwifi_error_dump (+7/-1)
data/kernel_crashdump (+7/-1)
data/kernel_oops (+7/-2)
To merge this branch: bzr merge lp:~brian-murray/apport/kernel-package-version
Reviewer Review Type Date Requested Status
Martin Pitt (community) Approve
Evan (community) Approve
Review via email: mp+217650@code.launchpad.net

Description of the change

For kernel crashes when creating the crash file for the Package key we also need to add the version of the package otherwise the data in the error tracker is incomplete.

https://errors.ubuntu.com/bucket/?id=iwlwifi:22.24.8.0:0x00000038%20|%20BAD_COMMAND

To post a comment you must log in.
Revision history for this message
Evan (ev) wrote :

Looks good. We could probably refactor this into a separate function, but that's not worth blocking the MP on.

review: Approve
Revision history for this message
Martin Pitt (pitti) wrote :

LGTM, thanks! Merging with a NEWS entry.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'apport/hookutils.py'
--- apport/hookutils.py 2013-07-17 05:39:38 +0000
+++ apport/hookutils.py 2014-04-29 17:43:07 +0000
@@ -490,7 +490,7 @@
490 '''Extract recent messages from a logfile which match a regex.490 '''Extract recent messages from a logfile which match a regex.
491491
492 pattern should be a "re" object. By default this catches at most the last492 pattern should be a "re" object. By default this catches at most the last
493 1000 lines, but this can be modified with a different maxlines argument.493 10000 lines, but this can be modified with a different maxlines argument.
494 '''494 '''
495 lines = ''495 lines = ''
496 try:496 try:
497497
=== modified file 'data/apportcheckresume'
--- data/apportcheckresume 2012-12-10 11:48:26 +0000
+++ data/apportcheckresume 2014-04-29 17:43:07 +0000
@@ -39,7 +39,13 @@
39 pr.add_os_info()39 pr.add_os_info()
40 pr.add_proc_info()40 pr.add_proc_info()
41 pr.add_user_info()41 pr.add_user_info()
42 pr['Package'] = 'linux-image-' + os.uname()[2]42 package = apport.packaging.get_kernel_package()
43 try:
44 package_version = apport.packaging.get_version(package)
45 except ValueError as e:
46 if 'does not exist' in e.message:
47 package_version = 'unknown'
48 pr['Package'] = '%s %s' % (package, package_version)
4349
44 # grab the contents of the suspend/resume flag file50 # grab the contents of the suspend/resume flag file
45 attach_file_if_exists(pr, flagfile, 'Failure')51 attach_file_if_exists(pr, flagfile, 'Failure')
4652
=== modified file 'data/iwlwifi_error_dump'
--- data/iwlwifi_error_dump 2014-04-28 16:38:55 +0000
+++ data/iwlwifi_error_dump 2014-04-29 17:43:07 +0000
@@ -24,7 +24,13 @@
24 sys.exit(1)24 sys.exit(1)
2525
26pr = apport.Report('KernelCrash')26pr = apport.Report('KernelCrash')
27pr['Package'] = apport.packaging.get_kernel_package()27package = apport.packaging.get_kernel_package()
28try:
29 package_version = apport.packaging.get_version(package)
30except ValueError as e:
31 if 'does not exist' in e.message:
32 package_version = 'unknown'
33pr['Package'] = '%s %s' % (package, package_version)
28pr['Title'] = 'iwlwifi firmware error'34pr['Title'] = 'iwlwifi firmware error'
29pr.add_os_info()35pr.add_os_info()
3036
3137
=== modified file 'data/kernel_crashdump'
--- data/kernel_crashdump 2013-03-18 16:25:49 +0000
+++ data/kernel_crashdump 2014-04-29 17:43:07 +0000
@@ -18,7 +18,13 @@
18vmcore_path = os.path.join(vmcore_root, 'vmcore')18vmcore_path = os.path.join(vmcore_root, 'vmcore')
1919
20pr = apport.Report('KernelCrash')20pr = apport.Report('KernelCrash')
21pr['Package'] = apport.packaging.get_kernel_package()21package = apport.packaging.get_kernel_package()
22try:
23 package_version = apport.packaging.get_version(package)
24except ValueError as e:
25 if 'does not exist' in e.message:
26 package_version = 'unknown'
27pr['Package'] = '%s %s' % (package, package_version)
2228
23pr.add_os_info()29pr.add_os_info()
24if os.path.exists(vmcore_path + '.log'):30if os.path.exists(vmcore_path + '.log'):
2531
=== modified file 'data/kernel_oops'
--- data/kernel_oops 2013-09-19 21:18:22 +0000
+++ data/kernel_oops 2014-04-29 17:43:07 +0000
@@ -26,8 +26,13 @@
26pr['Failure'] = 'oops'26pr['Failure'] = 'oops'
27pr['Tags'] = 'kernel-oops'27pr['Tags'] = 'kernel-oops'
28pr['Annotation'] = _('Your system might become unstable now and might need to be restarted.')28pr['Annotation'] = _('Your system might become unstable now and might need to be restarted.')
2929package = apport.packaging.get_kernel_package()
30pr['Package'] = 'linux-image-' + os.uname()[2]30try:
31 package_version = apport.packaging.get_version(package)
32except ValueError as e:
33 if 'does not exist' in e.message:
34 package_version = 'unknown'
35pr['Package'] = '%s %s' % (package, package_version)
31pr['SourcePackage'] = 'linux'36pr['SourcePackage'] = 'linux'
3237
33pr['OopsText'] = oops38pr['OopsText'] = oops

Subscribers

People subscribed via source and target branches