Re: why deos debconf call postrm again?
Christian Hammers wrote:
> As you can see, this frontend calls my postrm *again* which leads to an
> error because I do things there I cannot do twice!
> (e.g. removing a user)
>
> Any ideas?
Yes. Make your postrm idempotent. All package scripts are required to be
idempotent by the packaging manual, and debconf depends on it.
Practically, this means: don't delete a user who does not exist.
COnsider what woulds happen anyway if the admin of the system deleted
that user before removing your package ...
file:/usr/doc/packaging-manual/packaging.html/ch-maintainerscripts.html:
It is necessary for the error recovery procedures that the scripts be
idempotent: ie, invoking the same script several times in the same
situation should do no harm. If the first call failed, or
aborted half way through for some reason, the second call should
merely do the things that were left undone the first time, if any, and
exit with a success status.
--
see shy jo
Reply to: