TurnKey Linux's take on Ubuntu appliance development: KISS

Alon Swartz alon at turnkeylinux.org
Thu Jan 7 16:57:59 GMT 2010

Forest Bond wrote:
> Hi,
> On Thu, Jan 07, 2010 at 05:07:04PM +0100, Pau Garcia i Quiles wrote:
>> On Thu, Jan 7, 2010 at 3:58 PM, Forest Bond <forest at alittletooquiet.net> wrote:
>>> Hi,
>>> On Thu, Jan 07, 2010 at 01:31:44AM +0100, Pau Garcia i Quiles wrote:
>>>> Now, there is something nobody has said yet: order of installation.
>>>> That's the main difficulty I see with packages (and rest assured, I am
>>>> all for using packages to build appliances). AFAIK you cannot
>>>> guarantee in what order will apt install the packages, therefore it
>>>> might happen that postfix-appliance-config is installed before postfix
>>>> and, well, it won't work.
>>> I don't believe this is true.  Quoting from the Debian Policy Manual:
>>>  The Depends field should also be used if the postinst, prerm or postrm scripts
>>>  require the package to be present in order to run. Note, however, that the
>>>  postrm cannot rely on any non-essential packages to be present during the
>>>  purge phase.
>>> I think that this implies that a depended-upon package is guaranteed to be
>>> unpacked before executing the postinst script for the package with the
>>> dependency.  I assume that's where you'd run your configuration customization.
>> Will the depended-upon package it be "unpacked"? or "configured"?
>> "unpacked" is not enough, IMHO
> Looking at the dpkg source, I believe packages are configured in order of
> dependencies, also, so the depended-upon package should be configured before the
> depending package.  I think that as long as the dependencies are correct, you
> don't have to worry about the order of unpack, configure, etc.

If you're interested in the deb installation procedure, take a look at
the Debian Policy Manual, Chapter 6 - Package maintainer scripts and
installation procedure [1].

[1] http://www.debian.org/doc/debian-policy/ch-maintainerscripts.html

Alon Swartz

More information about the ubuntu-devel mailing list