Bug#286549: A demonstration
> Indeed, looking at the code, I see no basis for that
> statement, so I am closing this report. Please reopen it if you can
> demonstrate from dpkg source that policy is indeed incomplete.
I can demonstrate it by experiment. I created a dummy package foo with
maintainer scripts that print their names and arguments. Version 2 of
the package has a preinst that exits with status 1. Both new-postrm and
old-postinst get called, in that order, with "abort-upgrade" as the
first argument (and each other's version number as the second argument).
Preparing to replace foo 1 (using .../foo_2_all.deb) ...
/var/lib/dpkg/tmp.ci/preinst (new preinst) upgrade 1
dpkg: error processing /home/jdthood/tmp/foo_2_all.deb (--install):
subprocess pre-installation script returned error exit status 1
/var/lib/dpkg/tmp.ci/postrm (new postrm) abort-upgrade 1
/var/lib/dpkg/info/foo.postinst (old postinst) abort-upgrade 2
Errors were encountered while processing:
Thomas Hood <email@example.com>