package postfix-doc 3.4.13-0ubuntu1 failed to install/upgrade: installed postfix-doc package pre-removal script subprocess returned error exit status 1
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
postfix (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Received this prior to, and following, a reboot at end of upgrade from 19.10 to 20.04 on Oct 13, 2020. This machine has been upgraded from 18.10 to 19.04 to 19.10 to 20.04 over the last two days.
ProblemType: Package
DistroRelease: Ubuntu 20.04
Package: postfix-doc 3.4.13-0ubuntu1
ProcVersionSign
Uname: Linux 5.4.0-48-generic x86_64
ApportVersion: 2.20.11-0ubuntu27.9
Architecture: amd64
CasperMD5CheckR
Date: Tue Oct 13 13:00:56 2020
Dependencies:
DuplicateSignature:
package:
Removing postfix-doc (3.4.13-0ubuntu1) ...
postconf: fatal: open /etc/postfix/
dpkg: error processing package postfix-doc (--remove):
installed postfix-doc package pre-removal script subprocess returned error exit status 1
ErrorMessage: installed postfix-doc package pre-removal script subprocess returned error exit status 1
InstallationDate: Installed on 2018-11-14 (698 days ago)
InstallationMedia: Ubuntu 18.10 "Cosmic Cuttlefish" - Release amd64 (20181017.3)
PackageArchitec
Python3Details: /usr/bin/python3.8, Python 3.8.5, python3-minimal, 3.8.2-0ubuntu2
PythonDetails: /usr/bin/python2.7, Python 2.7.18, python-is-python2, 2.7.17-4
RelatedPackageV
dpkg 1.19.7ubuntu3
apt 2.0.2ubuntu0.1
SourcePackage: postfix
Title: package postfix-doc 3.4.13-0ubuntu1 failed to install/upgrade: installed postfix-doc package pre-removal script subprocess returned error exit status 1
UpgradeStatus: Upgraded to focal on 2020-10-13 (0 days ago)
tags: | removed: need-duplicate-check |
Thank you for taking the time to file a bug report.
I tried reproducing the upgrade path here inside a lxd container. Of course, since some of the versions you mentioned above are EOL'ed, I started with bionic and upgraded to focal. Everything worked. I made sure to have postfix, postfix-doc and all the other postfix-* packages installed. I also tried purging/removing some postfix-* packages, and then postfix, and then postfix-doc, but everything worked. Your logs tell me that the prerm script of postfix-doc could not locate the /etc/postfix/ main.cf file. This is what the script does:
case "$1" in upgrade| deconfigure)
postconf -e readme_directory=no html_directory=no
remove|
if [ -x /usr/sbin/postconf ]; then
fi
;;
...
The only way I could reproduce the failure you've seen was if I manually removed/renamed /etc/postfix/ main.cf, and the "apt remove postfix-doc":
Removing postfix-doc (3.4.13-0ubuntu1) ... main.cf for reading: No such file or directory
postconf: fatal: open /etc/postfix/
dpkg: error processing package postfix-doc (--remove):
installed postfix-doc package pre-removal script subprocess returned error exit status 1
dpkg: too many errors, stopping
Errors were encountered while processing:
postfix-doc
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)
I could not think of a way to remove postfix and still have /usr/sbin/postconf available. From your logs (especifically the DpkgTerminalLog .txt), it is not clear whether postfix was removed before the other postfix-* packages, but I very much doubt this was the case.
Since it seems likely to me that this is a local configuration problem,
rather than a bug in Ubuntu, I am marking this bug as 'Incomplete'.
However, if you believe that this is really a bug in Ubuntu, then we would
be grateful if you would provide a more complete description of the problem
with steps to reproduce, explain why you believe this is a bug in Ubuntu
rather than a problem specific to your system, and then change the bug
status back to "New".
For local configuration issues, you can find assistance here: www.ubuntu. com/support/ community
http://