Here's a debdiff[1] that I have tested and mitigate the situation with the reproducer using VirtualBox.
The proposal patch integrate a custom "debian/cups-daemon.prerm" maintainer script in case the pre-removal "old-version" from the installed package fails (as seen using the above reproducer) and then switch to the pre-removal script from the "new version" from the package to-be install in order to stop cups.socket and cups.path indivually before #DEBHELPER#.
Here's a debdiff[1] that I have tested and mitigate the situation with the reproducer using VirtualBox.
The proposal patch integrate a custom "debian/ cups-daemon. prerm" maintainer script in case the pre-removal "old-version" from the installed package fails (as seen using the above reproducer) and then switch to the pre-removal script from the "new version" from the package to-be install in order to stop cups.socket and cups.path indivually before #DEBHELPER#.
[1] debdiff: lp1642966_ xenial. debdiff
- Eric