package postfix-doc 3.4.13-0ubuntu1 failed to install/upgrade: installed postfix-doc package pre-removal script subprocess returned error exit status 1

Bug #1899682 reported by Ken Huffman, Jr.
8
This bug affects 1 person
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
ProcVersionSignature: Ubuntu 5.4.0-48.52-generic 5.4.60
Uname: Linux 5.4.0-48-generic x86_64
ApportVersion: 2.20.11-0ubuntu27.9
Architecture: amd64
CasperMD5CheckResult: skip
Date: Tue Oct 13 13:00:56 2020
Dependencies:

DuplicateSignature:
 package:postfix-doc:3.4.13-0ubuntu1
 Removing postfix-doc (3.4.13-0ubuntu1) ...
 postconf: fatal: open /etc/postfix/main.cf for reading: No such file or directory
 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)
PackageArchitecture: all
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
RelatedPackageVersions:
 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)

Revision history for this message
Ken Huffman, Jr. (khuffmanjr) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

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
    remove|upgrade|deconfigure)
        if [ -x /usr/sbin/postconf ]; then
            postconf -e readme_directory=no html_directory=no
        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) ...
postconf: fatal: open /etc/postfix/main.cf for reading: No such file or directory
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:
http://www.ubuntu.com/support/community

Changed in postfix (Ubuntu):
status: New → Incomplete
Revision history for this message
Ken Huffman, Jr. (khuffmanjr) wrote : Re: [Bug 1899682] Re: package postfix-doc 3.4.13-0ubuntu1 failed to install/upgrade: installed postfix-doc package pre-removal script subprocess returned error exit status 1
Download full text (4.9 KiB)

I've rebooted/shutdown several times and no more errors. No apparent
problems in what I'm doing with the OS either. My report was just the
standard "send report" button submission in case it helped anyone.

Thanks for the look. I'm happy with operations at this time. If I can
provide any other info or data please let me know.

Thanks!
Ken (khuffmanjr)

On Wed, Oct 14, 2020, 14:00 Sergio Durigan Junior <
<email address hidden>> wrote:

> 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
> remove|upgrade|deconfigure)
> if [ -x /usr/sbin/postconf ]; then
> postconf -e readme_directory=no html_directory=no
> 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) ...
> postconf: fatal: open /etc/postfix/main.cf for reading: No such file or
> directory
> 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:
> http://www.ubuntu.com/support/community
>
> ** Changed in: postfix (Ubuntu)
> Status: New => Incomplete
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1899682
>
> 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
>
> Status in postfix package in Ubuntu:
> Incomplete
>
...

Read more...

Revision history for this message
Paride Legovini (paride) wrote :

Thanks for the followup Ken. As neither us nor you can reproduce the problem and there's no indication that this is a bug in Ubuntu and not a local configuration problem, I'm marking this bug report as Invalid. Do no hesitate to file a new bug report should you encounter similar (or different!) issues again. Thanks.

Changed in postfix (Ubuntu):
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.