Permalink
Browse files

Include package version in package data

Apport includes the package and version in the package data for any report that
it creates. The Ubuntu Error Tracker expects the data to follow this format,
and should not have to look up the package version in different fields, so this
special hook should follow the format.
  • Loading branch information...
Brian Murray authored and happyaron committed Nov 1, 2016
1 parent b7a8dcb commit e97717945ae5fce8c9acd59190186f015f400b73
Showing with 6 additions and 6 deletions.
  1. +6 −6 dkms_apport.py
View
@@ -62,18 +62,18 @@
make_log=os.path.join('/var','lib','dkms',options.module,options.version,'build','make.log')
report = apport.Report('Package')
report['Package'] = package
try:
report['SourcePackage'] = apport.packaging.get_source(package)
except ValueError:
sys.stderr.write('ERROR (dkms apport): unable to determine source package for %s\n' % package)
sys.exit(3)
try:
version = packaging.get_version(package)
except ValueError:
version = '(not installed)'
if version is None:
version = '(not installed)'
report['Package'] = '%s %s' % (package, version)
try:
report['SourcePackage'] = apport.packaging.get_source(package)
except ValueError:
sys.stderr.write('ERROR (dkms apport): unable to determine source package for %s\n' % package)
sys.exit(3)
if report['SourcePackage'] == 'fglrx-installer':
fglrx_make_log = os.path.join('/var','lib','dkms',options.module,options.version,'build','make.sh.log')

0 comments on commit e977179

Please sign in to comment.