Control: tag 432893 pending
Hi!
Bug #432893 in package dpkg reported by you has been fixed in
the dpkg/dpkg.git Git repository. You can see the changelog below, and
you can check the diff of the fix at:
https://git.dpkg.org/cgit/dpkg/dpkg.git/diff/?id=422e8fc17
---
dpkg: Do not run the postinst during cleanup if the previous state was bad
During unpack, only call the postinst's abort-upgrade in cleanup if the
status was good before-hand. Same goes for postinst's abort-remove when
package was about to be removed due to a conflict. If the package was
halfconfigured, we do not run the postinst and that way there are no
surprises. When we do run the postinst we know that we can without fear
set the package to installed (or trig*, as the case may be). We achieve
this by not registering the cu_prerm* handlers unless the package was
in a state > PKG_STAT_HALFCONFIGURED beforehand. We have no more need to
pass the previous state into the cu_prerm* postinst invocations.
During remove, only call the postinst's abort-remove in cleanup if the
status was good before-hand (same logic than above). We can now remove
the static modifier for oldpkgstatus as we are not passing it to the
cleanup handler.
During cleanup, always mark the package status as installed if
abort-remove succeeds as this will only be called if the status was
greater than halfconfigured. Thus the oldpkgstatus parameter is now
useless and we can drop it.
Based-on-patch-by: Ian Jackson <[email protected]>
Closes: #432893