Flow of control in Debian maintainer scripts

By jan | Wednesday, January 7th, 2009

The Debian package installation process (as described in the Debian policy) is fairly complicated, at least internally. During the process of building a Debian package for our software I often had to check the policy manual for the order the various maintainer scripts (e.g. postinst, prerm etc.) are called. To complicate things further, both the old and new scripts get called (at least during an upgrade). There are various “error-unwinds” (= rollbacks) and final error states.

It struck me that a visual representation would make things a lot easier, so here’s one I knocked together in OmniGraffle, for future reference:

maintainer scripts call sequence

maintainer scripts call sequence

This entry was posted on Wednesday, January 7th, 2009 at 4:18 pm and is filed under Coding. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply

New York Office
234 5th Avenue, 4th Floor
New York, NY
10001, USA

London Office
The Trampery
8-15 Dereham Place
London EC2A 3HJ
United Kingdom