While I haven't seen what fix was used in 4.45-0ubuntu3 (still waiting for the mirror to be pulsed), I'll point out that the main issue seems to be that prerm misses the case/esac traps to intercept dpkg commands:
# summary of how this script can be called:
# * <prerm> `remove'
# * <old-prerm> `upgrade' <new-version>
# * <new-prerm> `failed-upgrade' <old-version>
# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
# * <deconfigured's-prerm> `deconfigure' `in-favour'
# <package-being-installed> <version> `removing'
# <conflicting-package> <version>
While I haven't seen what fix was used in 4.45-0ubuntu3 (still waiting for the mirror to be pulsed), I'll point out that the main issue seems to be that prerm misses the case/esac traps to intercept dpkg commands:
# summary of how this script can be called: s-prerm> `remove' `in-favour' <package> <new-version> s-prerm> `deconfigure' `in-favour' being-installed > <version> `removing' package> <version>
# * <prerm> `remove'
# * <old-prerm> `upgrade' <new-version>
# * <new-prerm> `failed-upgrade' <old-version>
# * <conflictor'
# * <deconfigured'
# <package-
# <conflicting-
This is what made the upgrade fail.