While writing the test case for the SRU of this bug I discovered an
error in the regular expression I wrote.

+            # for packages that run update-grub include /etc/default/grub
+            UPDATE_BOOT = ['memtest86+', 'linux', 'ubuntu-meta',
+                'virtualbox-ose']
+            ug_failure = 'User post(inst|rm) hook script 
\[(/usr)?/sbin/update-grub\] exited with value [1-9]+'
+            if re.search(ug_failure, termlog):
+                if report['SourcePackage'] in UPDATE_BOOT:
+                    attach_default_grub(report, 'EtcDefaultGrub')


The ug_failure regular expression was created by looking at package 
installation failure log files, DpkgTerminalLog, for the grub2 package.  It 
seems that error message from grub2 is different than that of the one from any 
of the packages in UPDATE_BOOT.  Instead for a memtest86+ failure we'll have 
the following:

/etc/default/grub: 9: splash: not found^M
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 127^M
Failed to process /etc/kernel/postinst.d at 
/var/lib/dpkg/info/linux-image-2.6.38-13-generic.postinst line 1010.^M
dpkg: error processing linux-image-2.6.38-13-generic (--configure):^M
 subprocess installed post-installation script returned error exit status 2^M
Setting up memtest86+ (4.10-1.1ubuntu1) ...^M

So the ug_failure regular expression needs to be reworked to actually
match the errors created by the packages in UPDATE_BOOT.

** Changed in: apport (Ubuntu)
       Status: Fix Released => In Progress

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1006633

Title:
  should collect /etc/default/grub from package install failures due to
  update-grub failing

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apport/+bug/1006633/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to