TurnKey Linux's take on Ubuntu appliance development: KISS

Forest Bond forest at alittletooquiet.net
Thu Jan 7 16:31:42 GMT 2010


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.

Forest Bond
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : https://lists.ubuntu.com/archives/ubuntu-devel/attachments/20100107/94f062c5/attachment.pgp 

More information about the ubuntu-devel mailing list