[Bug 1692127] Re: duplicate signature for Package problems can be too short
Brian Murray
brian at ubuntu.com
Fri Jun 30 22:26:44 UTC 2017
This worked for me in zesty with apport version 2.20.4-0ubuntu4.4:
DuplicateSignature:
package:linux-image-4.10.0-22-generic:4.10.0-22.24
Setting up linux-image-4.10.0-22-generic (4.10.0-22.24) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
Not updating initrd symbolic links since we are being updated/reinstalled
(4.10.0-22.24 was configured last, according to dpkg)
Not updating image symbolic links since we are being updated/reinstalled
(4.10.0-22.24 was configured last, according to dpkg)
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.10.0-22-generic /boot/vmlinuz-4.10.0-22-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.10.0-22-generic /boot/vmlinuz-4.10.0-22-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.10.0-22-generic /boot/vmlinuz-4.10.0-22-generic
update-initramfs: Generating /boot/initrd.img-4.10.0-22-generic
run-parts: executing /etc/kernel/postinst.d/pm-utils 4.10.0-22-generic /boot/vmlinuz-4.10.0-22-generic
run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 4.10.0-22-generic /boot/vmlinuz-4.10.0-22-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 4.10.0-22-generic /boot/vmlinuz-4.10.0-22-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.10.0-22-generic /boot/vmlinuz-4.10.0-22-generic
/usr/sbin/grub-mkconfig: 15: /etc/default/grub: Syntax error: Unterminated quoted string
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 2
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-4.10.0-22-generic.postinst line 1052.
dpkg: error processing package linux-image-4.10.0-22-generic (--configure):
subprocess installed post-installation script returned error exit status 2
** Tags removed: verification-needed-zesty
** Tags added: verification-done-zesty
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to apport in Ubuntu.
https://bugs.launchpad.net/bugs/1692127
Title:
duplicate signature for Package problems can be too short
Status in apport package in Ubuntu:
Fix Released
Status in apport source package in Xenial:
Fix Committed
Status in apport source package in Yakkety:
Fix Committed
Status in apport source package in Zesty:
Fix Committed
Status in apport source package in Artful:
Fix Released
Bug description:
[Impact]
apport is creating a shorter than appropriate duplicate signature in apport-package bug reports which can lead to misconsolidation and confused developers.
[Test Case]
1) Boot a system with an old kernel installed or a freshly installed system
2) edit /etc/default/grub and replace a ` with a '
3) Upgrade the kernel, watch it crash
4) Discover a crash report with a DuplicateSignature whose 2nd line starts with "Examining"
With the version of the package from -proposed the DuplicateSignature
in this case should really have a 2nd line that starts with 'Setting
up linux-image* ...'. While in this particular case not much is lost
in other cases valuable information will be missing.
[Regression Potential]
The code change is correct and has been tested in artful, additionally I'm using the same regular expression to clean up apport-package reports as they come in to LP. The only risk here is a typo in the patch that would cause the hook (the change is in the ubuntu general hook) to error out which apport would handle gracefully and we just wouldn't have a DuplicateSignature.
[The Original Description]
Steve brought up bug 1691983 and how it's duplicate signature is missing information. It contains:
package:shim-signed:1.27~16.04.1+0.9+1474479173.6c180c6-1ubuntu1
Installing for x86_64-efi platform.
Installation finished. No error reported.
Running in non-interactive mode, doing nothing.
dpkg: error processing package shim-signed (--configure):
subprocess installed post-installation script returned error exit status 1
But is missing:
Setting up shim-signed (1.27~16.04.1+0.9+1474479173.6c180c6-1ubuntu1) ...
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
debconf: unable to initialize frontend: Passthrough
debconf: (Cannot connect to /tmp/aptdaemon-7jrqb_du/debconf.socket: Connection refused at (eval 18) line 3.)
debconf: falling back to frontend: Noninteractive
This is because of the following code in data/general-hooks/ubuntu.py:
145 PKG_MSGS = ('Authenticating', 'De-configuring', 'Examining',
146 'Installing ', 'Preparing', 'Processing triggers', 'Purging',
147 'Removing', 'Replaced', 'Replacing', 'Setting up',
148 'Unpacking', 'Would remove')
149 for line in termlog.split('\n'):
150 if line.startswith(PKG_MSGS):
151 dupe_sig = '%s\n' % line
152 continue
The shim-signed package prints a line starts with "Installing " and
that matches PKG_MSGS so we reset the dupe_sig because that's a
message we'd expect from a package manager.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apport/+bug/1692127/+subscriptions
More information about the foundations-bugs
mailing list