(debian-policy.info)Maintainer scripts idempotency


Next: Controlling terminal for maintainer scripts Prev: Introduction to package maintainer scripts Up: Package maintainer scripts and installation procedure
Enter node , (file) or (file)node

6.2 Maintainer scripts idempotency
==================================

It is necessary for the error recovery procedures that the scripts be
idempotent.  This means that if it is run successfully, and then it is
called again, it doesn’t bomb out or cause any harm, but just ensures
that everything is the way it ought to be.  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 if everything is OK. (1)

   ---------- Footnotes ----------

   (1) This is so that if an error occurs, the user interrupts ‘dpkg’ or
some other unforeseen circumstance happens you don’t leave the user with
a badly-broken package when ‘dpkg’ attempts to repeat the action.


automatically generated by info2www version 1.2.2.9