apport-hackers team mailing list archive
-
apport-hackers team
-
Mailing list archive
-
Message #00162
[Merge] lp:~brian-murray/apport/kernel-package-version into lp:apport
Brian Murray has proposed merging lp:~brian-murray/apport/kernel-package-version into lp:apport.
Requested reviews:
Apport upstream developers (apport-hackers)
For more details, see:
https://code.launchpad.net/~brian-murray/apport/kernel-package-version/+merge/217650
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
--
https://code.launchpad.net/~brian-murray/apport/kernel-package-version/+merge/217650
Your team Apport upstream developers is requested to review the proposed merge of lp:~brian-murray/apport/kernel-package-version into lp:apport.
=== 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 @@
'''Extract recent messages from a logfile which match a regex.
pattern should be a "re" object. By default this catches at most the last
- 1000 lines, but this can be modified with a different maxlines argument.
+ 10000 lines, but this can be modified with a different maxlines argument.
'''
lines = ''
try:
=== 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 @@
pr.add_os_info()
pr.add_proc_info()
pr.add_user_info()
- pr['Package'] = 'linux-image-' + os.uname()[2]
+ package = apport.packaging.get_kernel_package()
+ try:
+ package_version = apport.packaging.get_version(package)
+ except ValueError as e:
+ if 'does not exist' in e.message:
+ package_version = 'unknown'
+ pr['Package'] = '%s %s' % (package, package_version)
# grab the contents of the suspend/resume flag file
attach_file_if_exists(pr, flagfile, 'Failure')
=== 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 @@
sys.exit(1)
pr = apport.Report('KernelCrash')
-pr['Package'] = apport.packaging.get_kernel_package()
+package = apport.packaging.get_kernel_package()
+try:
+ package_version = apport.packaging.get_version(package)
+except ValueError as e:
+ if 'does not exist' in e.message:
+ package_version = 'unknown'
+pr['Package'] = '%s %s' % (package, package_version)
pr['Title'] = 'iwlwifi firmware error'
pr.add_os_info()
=== 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 @@
vmcore_path = os.path.join(vmcore_root, 'vmcore')
pr = apport.Report('KernelCrash')
-pr['Package'] = apport.packaging.get_kernel_package()
+package = apport.packaging.get_kernel_package()
+try:
+ package_version = apport.packaging.get_version(package)
+except ValueError as e:
+ if 'does not exist' in e.message:
+ package_version = 'unknown'
+pr['Package'] = '%s %s' % (package, package_version)
pr.add_os_info()
if os.path.exists(vmcore_path + '.log'):
=== 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 @@
pr['Failure'] = 'oops'
pr['Tags'] = 'kernel-oops'
pr['Annotation'] = _('Your system might become unstable now and might need to be restarted.')
-
-pr['Package'] = 'linux-image-' + os.uname()[2]
+package = apport.packaging.get_kernel_package()
+try:
+ package_version = apport.packaging.get_version(package)
+except ValueError as e:
+ if 'does not exist' in e.message:
+ package_version = 'unknown'
+pr['Package'] = '%s %s' % (package, package_version)
pr['SourcePackage'] = 'linux'
pr['OopsText'] = oops