Control: reopen -1

On Sun, Apr 29, 2018 at 12:09:12AM +0000, Debian Bug Tracking System wrote:
> Uploaded.

Alas, distracted by the other bug, I tested only install.  Not even
removing.  Nor upgrading.

When the main bug this upload was supposed to fix dealt with failure to
upgrade, a review that did not test upgrading is a proof of brain damage.

Anyway, we got this:

postrm called with unknown argument `remove'
dpkg: error processing package spacefm (--remove):
 installed spacefm package post-removal script subprocess returned error exit 
status 1
Removing spacefm-common (1.0.6-1) ...
Errors were encountered while processing:
 spacefm

and this:

Preparing to unpack .../pkg/spacefm_1.0.6-2_amd64.deb ...
Unpacking spacefm (1.0.6-2) over (1.0.6-1) ...
postrm called with unknown argument `upgrade'
dpkg: warning: old spacefm package post-removal script subprocess returned 
error exit status 1
dpkg: trying script from the new package instead ...
postrm called with unknown argument `failed-upgrade'
dpkg: error processing archive /home/kilobyte/tmp/pkg/spacefm_1.0.6-2_amd64.deb 
(--install):
 new spacefm package post-removal script subprocess returned error exit status 1
postrm called with unknown argument `abort-upgrade'
dpkg: error while cleaning up:
 new spacefm package post-removal script subprocess returned error exit status 1

The Policy provides the following section:

# The "postrm" script may be called in the following ways:
# 
#    "postrm" remove
#    "postrm" purge
#    "old-postrm" upgrade *new-version*
#    "disappearer's-postrm" disappear overwriter *overwriter-version*
# 
#    The "postrm" script is called after the package’s files have been
#    removed or replaced. The package whose "postrm" is being called may
#    have previously been deconfigured and only be “Unpacked”, at which
#    point subsequent package changes do not consider its dependencies.
#    Therefore, all "postrm" actions may only rely on essential packages
#    and must gracefully skip any actions that require the package’s
#    dependencies if those dependencies are unavailable. [4]
# 
# "new-postrm" failed-upgrade *old-version*
#    Called when the old "postrm upgrade" action fails. The new package
#    will be unpacked, but only essential packages and pre-dependencies
#    can be relied on. Pre-dependencies will either be configured or
#    will be “Unpacked” or “Half-Configured” but previously had been
#    configured and was never removed.
# 
#    "new-postrm" abort-install
#    "new-postrm" abort-install *old-version*
#    "new-postrm" abort-upgrade *old-version*
# 
#    Called before unpacking the new package as part of the error
#    handling of "preinst" failures. May assume the same state as
#    "preinst" can assume.

You need to handle all of these cases.


Meow!
-- 
⢀⣴⠾⠻⢶⣦⠀ I've read an article about how lively happy music boosts
⣾⠁⢰⠒⠀⣿⡁ productivity.  You can read it, too, you just need the
⢿⡄⠘⠷⠚⠋⠀ right music while doing so.  I recommend Skepticism
⠈⠳⣄⠀⠀⠀⠀ (funeral doom metal).

Reply via email to