Public bug reported:

Description:    Ubuntu 16.04.2 LTS
Release:        16.04

grub-efi-amd64:
  Installed: 2.02~beta2-36ubuntu3.10
  Candidate: 2.02~beta2-36ubuntu3.10
  Version table:
 *** 2.02~beta2-36ubuntu3.10 500
        500 http://archive.ubuntu.com/ubuntu xenial-proposed/main amd64 Packages
        100 /var/lib/dpkg/status
     2.02~beta2-36ubuntu3.9 500
        500 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
     2.02~beta2-36ubuntu3 500
        500 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages

Line 699 of the following post-installation script

/var/lib/dpkg/info/grub-efi-amd64.postinst

reads thus, after the latest update.

      if dpkg --compare-versions "$2" lt-nl 2.02~beta2-36ubuntu3.10 then

Notice the missing semicolon before the then clause of the if statement.

It should really be

      if dpkg --compare-versions "$2" lt-nl 2.02~beta2-36ubuntu3.10 ;
then

Fortunately, I noticed the issue from the dist-upgrade output, and fixed
it before rebooting the machine as requested by Software Updater, or
there is no telling where I could have been stuck.

After patching it, one needs to rerun

sudo apt -y dist-upgrade

so the postinst script is actually correctly run.

This is a major bug for an LTS release.

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: grub-efi-amd64 2.02~beta2-36ubuntu3.10
ProcVersionSignature: Ubuntu 4.4.0-79.100-generic 4.4.67
Uname: Linux 4.4.0-79-generic x86_64
NonfreeKernelModules: wl nvidia_uvm nvidia_drm nvidia_modeset nvidia
ApportVersion: 2.20.1-0ubuntu2.6
Architecture: amd64
CurrentDesktop: Unity
Date: Sat May 20 12:20:02 2017
InstallationDate: Installed on 2016-05-23 (361 days ago)
InstallationMedia: Ubuntu 16.04 LTS "Xenial Xerus" - Release amd64 (20160420.1)
JournalErrors:
 Error: command ['journalctl', '-b', '--priority=warning', '--lines=1000'] 
failed with exit code 1: Hint: You are currently not seeing messages from other 
users and the system.
       Users in the 'systemd-journal' group can see all messages. Pass -q to
       turn off this notice.
 No journal files were opened due to insufficient permissions.
SourcePackage: grub2
UpgradeStatus: No upgrade log present (probably fresh install)

** Affects: grub2 (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug package-from-proposed xenial

** Patch added: "This file has just a single semicolon more than the original 
shipped with the latest update."
   
https://bugs.launchpad.net/bugs/1692181/+attachment/4879999/+files/grub-efi-amd64.postinst

** Description changed:

  Description:  Ubuntu 16.04.2 LTS
  Release:      16.04
  
  grub-efi-amd64:
-   Installed: 2.02~beta2-36ubuntu3.10
-   Candidate: 2.02~beta2-36ubuntu3.10
-   Version table:
-  *** 2.02~beta2-36ubuntu3.10 500
-         500 http://archive.ubuntu.com/ubuntu xenial-proposed/main amd64 
Packages
-         100 /var/lib/dpkg/status
-      2.02~beta2-36ubuntu3.9 500
-         500 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 
Packages
-      2.02~beta2-36ubuntu3 500
-         500 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages
+   Installed: 2.02~beta2-36ubuntu3.10
+   Candidate: 2.02~beta2-36ubuntu3.10
+   Version table:
+  *** 2.02~beta2-36ubuntu3.10 500
+         500 http://archive.ubuntu.com/ubuntu xenial-proposed/main amd64 
Packages
+         100 /var/lib/dpkg/status
+      2.02~beta2-36ubuntu3.9 500
+         500 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 
Packages
+      2.02~beta2-36ubuntu3 500
+         500 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages
  
  Line 699 of the following post-installation script
  
  /var/lib/dpkg/info/grub-efi-amd64.postinst
  
  reads thus, after the latest update.
  
-         if dpkg --compare-versions "$2" lt-nl 2.02~beta2-36ubuntu3.10
- then
+       if dpkg --compare-versions "$2" lt-nl 2.02~beta2-36ubuntu3.10 then
  
  Notice the missing semicolon before the then clause of the if statement.
  
  It should really be
  
-         if dpkg --compare-versions "$2" lt-nl 2.02~beta2-36ubuntu3.10 ;
+       if dpkg --compare-versions "$2" lt-nl 2.02~beta2-36ubuntu3.10 ;
  then
  
  Fortunately, I noticed the issue from the dist-upgrade output, and fixed
  it before rebooting the machine as requested by Software Updater, or
  there is no telling where I could have been stuck.
  
  This is a major bug for an LTS release.
  
  ProblemType: Bug
  DistroRelease: Ubuntu 16.04
  Package: grub-efi-amd64 2.02~beta2-36ubuntu3.10
  ProcVersionSignature: Ubuntu 4.4.0-79.100-generic 4.4.67
  Uname: Linux 4.4.0-79-generic x86_64
  NonfreeKernelModules: wl nvidia_uvm nvidia_drm nvidia_modeset nvidia
  ApportVersion: 2.20.1-0ubuntu2.6
  Architecture: amd64
  CurrentDesktop: Unity
  Date: Sat May 20 12:20:02 2017
  InstallationDate: Installed on 2016-05-23 (361 days ago)
  InstallationMedia: Ubuntu 16.04 LTS "Xenial Xerus" - Release amd64 
(20160420.1)
  JournalErrors:
-  Error: command ['journalctl', '-b', '--priority=warning', '--lines=1000'] 
failed with exit code 1: Hint: You are currently not seeing messages from other 
users and the system.
-        Users in the 'systemd-journal' group can see all messages. Pass -q to
-        turn off this notice.
-  No journal files were opened due to insufficient permissions.
+  Error: command ['journalctl', '-b', '--priority=warning', '--lines=1000'] 
failed with exit code 1: Hint: You are currently not seeing messages from other 
users and the system.
+        Users in the 'systemd-journal' group can see all messages. Pass -q to
+        turn off this notice.
+  No journal files were opened due to insufficient permissions.
  SourcePackage: grub2
  UpgradeStatus: No upgrade log present (probably fresh install)

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

Title:
  bash syntax error in the postinst script

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

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

Reply via email to