[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Packages not removable because the `/etc/init.d/package stop' fails.

Charles Plessy <plessy@debian.org> writes:

> It seems that some packaged daemons use a combination of scripts that
> sometimes makes them difficult to remove on Etch:
>  - prerm stops the daemon and exits if it fails

This is generally correct.  If the daemon can't shut down cleanly,
continuing with the upgrade anyway could result in data corruption or loss
depending on the daemon.  I think it's the correct conservative behavior
to stop at that point and force manual intervention.

>  - /etc/init.d/package stops the daemon using start-stop-daemon and
>    fails if it was not running.

This isn't correct.

> As a result, if the daemon is not running, postrm fails and the package
> can not be removed. See #489366 for example. Now I wonder how to deal
> with that kind of problem. It could be solved at the package level,
> except that such bug but is probably not grave enough for the package to
> be updated in Etch.

Well, it's an RC bug (violation of the must in Policy 9.3.2) for the stop
action of an init script to fail if the daemon is not running, which is
fairly serious.  I think it could well warrant a stable update if it's
causing problems for upgrades to lenny.

The other option is to work around it in the upgraded version of the
package; if the prerm script fails, there's an error handling case that
calls the new prerm script with the failed-upgrade argument and gives it
an opportunity to say "yes, I don't care, continue anyway."

Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>

Reply to: