Public bug reported:

Apport doesn't allow the upload, because it's a known error.
Since I never had an issue I'd like to report the multiple syntax errors in the 
.postinst file of grub-pc.
Terminal output excerpt:
sudo apt upgrade
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Setting up grub-pc (2.02~beta2-36ubuntu3.10) ...
/var/lib/dpkg/info/grub-pc.postinst: line 703: syntax error near unexpected 
token `fi'
dpkg: error processing package grub-pc (--configure):
 subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
 grub-pc
E: Sub-process /usr/bin/dpkg returned an error code (1)

I've started to fix grub-pc.postinst step by step, because after
removing the 'fi' in line 703 there occur more and more til line 740,
e.g. semicolons, brackets and at the end it says unexpected end of file,
which I was unable to fix, original it says exit 0. I've tried several
inputs, looked at examples of other .postinst files, but nothing worked.

Renaming /var/lib/dpkg/info/grub-pc.postinst and reinstalling grub-pc
didn't help.

dpkg --configure -a 
and
dpkg-reconfigure <package>
didn't help.

It would be nice if someone could fix the syntax. Thanks!

apt-cache policy grub-pc
grub-pc:
  Installiert:           2.02~beta2-36ubuntu3.10
  Installationskandidat: 2.02~beta2-36ubuntu3.10
  Versionstabelle:
 *** 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

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: grub-pc 2.02~beta2-36ubuntu3.10
ProcVersionSignature: Ubuntu 4.8.0-53.56~16.04.1-generic 4.8.17
Uname: Linux 4.8.0-53-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.6
Architecture: amd64
CurrentDesktop: Unity
Date: Sat May 20 17:21:45 2017
InstallationDate: Installed on 2016-11-02 (198 days ago)
InstallationMedia: Ubuntu 16.04.1 LTS "Xenial Xerus" - Beta amd64 (20160823)
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

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

Title:
  Syntax error in .postinst - broken package

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

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

Reply via email to