diff -u apport-2.20.1/data/general-hooks/ubuntu.py apport-2.20.1/data/general-hooks/ubuntu.py --- apport-2.20.1/data/general-hooks/ubuntu.py +++ apport-2.20.1/data/general-hooks/ubuntu.py @@ -116,6 +116,7 @@ else: termlog = None if termlog: + (package, version) = report['Package'].split(None, 1) # for packages that run update-grub include /etc/default/grub UPDATE_BOOT = ['friendly-recovery', 'linux', 'memtest86+', 'plymouth', 'ubuntu-meta', 'virtualbox-ose'] @@ -141,8 +142,8 @@ report['UnreportableReason'] = _('An Ubuntu package has a file conflict with a package that is not a genuine Ubuntu package.') add_tag(report, 'package-conflict') if [d for d in PKG_MSGS if d in dupe_sig]: - report['DuplicateSignature'] = dupe_sig # the duplicate signature should be the first failure + report['DuplicateSignature'] = 'package:%s:%s\n%s' % (package, version, dupe_sig) break if dupe_sig: if dpkg_log_without_error.find(dupe_sig) != -1: @@ -465,7 +466,7 @@ if isinstance(lines[0], str): report['DpkgTerminalLog'] = '\n'.join(lines) else: - report['DpkgTerminalLog'] = '\n'.join([str(line.encode('utf-8')) for line in lines]) + report['DpkgTerminalLog'] = '\n'.join([str(line.decode('utf-8')) for line in lines]) def get_attachment_contents(report, attachment): diff -u apport-2.20.1/debian/changelog apport-2.20.1/debian/changelog --- apport-2.20.1/debian/changelog +++ apport-2.20.1/debian/changelog @@ -1,3 +1,13 @@ +apport (2.20.1-0ubuntu2.1) xenial-proposed; urgency=medium + + * data/general-hooks/ubuntu.py: Fix stacktrace when parsing + DpkgTerminalLog.txt. (LP: #1548421) + * data/general-hooks/ubuntu.py: Restore starting package problem duplicate + signatures with the word package, the package name, and its version. + (LP: #1581682) + + -- Brian Murray Mon, 16 May 2016 15:02:01 -0700 + apport (2.20.1-0ubuntu2) xenial; urgency=medium * Merge fixes from trunk: