Control: severity 779254 grave

On 2015-02-25, John Crout wrote:
> Zoneminder wouldn't install.  (State is "rH").  I attempted to remove
> it but this also failed.

Well, that sounds pretty bad...


> I traced the error to use of an invalid parameter passed to the postrn
> script.  The invalid value is "remove" but the script can't handle
> that value; it only  handles "purge".

That seems like a pretty major problem. Setting the severity
accordingly...


> Any attempt I might make to correct it would be a guess (such as
> setting the parameter value to "purge" in the script).  Rather than
> chance complications, I'm reporting and asking for direction.
>
> Here's the error:
> ... irrelevant output omitted
>
> 0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
> 1 not fully installed or removed.
> After this operation, 10.2 MB disk space will be freed.
> Do you want to continue? [Y/n]
> (Reading database ... 157264 files and directories currently installed.)
> Removing zoneminder ...
> postrm called with unknown argument `remove'
> dpkg: error processing zoneminder (--remove):
>  subprocess installed post-removal script returned error exit status 1
> Errors were encountered while processing:
>  zoneminder
> E: Sub-process /usr/bin/dpkg returned an error code (1)

If you don't have data on this install, you might want to try:

  apt-get --purge remove zoneminder


> Here's the postrm code:
> (from /var/lib/dpkg/info/zoneminder.postrm)
>
> #! /bin/sh
>
> set -e
>
> case "$1" in
>     purge)
>         echo 'delete from user where User="zmuser";' | mysql
> --defaults-file=/etc/mysql/debian.cnf mysql
>         echo 'delete from db where User="zmuser";' | mysql
> --defaults-file=/etc/mysql/debian.cnf mysql
>         mysqladmin --defaults-file=/etc/mysql/debian.cnf -f drop zm
>     ;;
>
>     *)
>         echo "postrm called with unknown argument \`$1'" >&2
>         exit 1
>     ;;
> esac

Manually adding to /var/lib/dpkg/info/zoneminder.postrm:

  remove) ;;

In between those two clauses might be enough to get it to remove
correctly.


> (I'm interested in maintaining the package if someone is willing to
> serve as a mentor.)

You might want to read and chime in the Request for Help bug:

  https://bugs.debian.org/760314
  [email protected]


live well,
  vagrant

Attachment: signature.asc
Description: PGP signature

Reply via email to