Package: dpkg
Version: 1.15.8.10
Severity: normal

Today, we were assisting a user on #debian at irc.oftc.net. He had
installed a package from a third-party source that included a bad
.postrm maintainer script. The script was executable, yet completely
empty. The package was therefore not removable, even with
--force-remove-reinstreq as it would cause an "Exec format error" and
refuse to remove it.

Please ensure dpkg can handle such broken maintainer scripts (either
upon removal, or even better, upon installation so the problem is
noticed and addressed earlier) as a user attempting to remove such a
broken package will be unable to do so without expert intervention.

This is a transcript of the attempted removal:

$ sudo dpkg --remove --force-remove-reinstreq caine-from-deb
dpkg: warning: overriding problem because --force enabled:
 Package is in a very bad inconsistent state - you should
 reinstall it before attempting a removal.
(Reading database ... 146919 files and directories currently installed.)
Removing caine-from-deb ...
dpkg (subprocess): unable to execute installed post-removal script 
(/var/lib/dpkg/info/caine-from-deb.postrm): Exec format error
dpkg: error processing caine-from-deb (--remove):
 subprocess installed post-removal script returned error exit status 2
Errors were encountered while processing:
 caine-from-deb

Of course, once we had determined the .postrm was empty, merely removing
the offending maintainer script enabled removal of the package, but this
sort of analysis is beyond the average user to accomplish on their own.

Thanks,
Ben



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to