[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Common set of debconf templates



Brian Sutherland wrote:
> Ah yes, thanks. A little bit of testing confirms for me that merely
> having a depends on a package (ssl-cert) is enough to be able to 
> register and ask questions from that package. Even on first install 
> on a clean chroot.
> 
> So, it dosn't seem necessary to do any copying of templates at build
> time (or any other time) if you merely want to have a common 
> question/translation templates package (not shared/*, about which I
> have no idea).
> 
> Am I missing something?

Only that dpkg-preconfigure is not guaranteed to be called, and if it is
called, there is nothing really to ensure that it runs for all debs that
are being installed (since there is no status updating done to note that
a package was preconfigured). So if the preconfiguration does not happen
at all, or fails for some reason on the package containing the shared
templates, then you could be left with a problem. 

dpkg configuration ordering should take care of it for postinst scripts
(but not for preinsts), if preconfiguration was not done at all.

At a minimum, you'd break this case:

dpkg-preconfigure some.deb

There's no guarantee here that some.deb's dependencies are already
installed, and so it may miss templates or use versions from an older
version of the template package than the one it depends on. You would at
least need to take care to exit the config script in this case and let
it re-run when the package is installed, and if you ever added versioned
dependencies on the template package you would have to make the config
script detect that it was running with templates from an older version
of the package and abort.

There may be other cases that would be broken that I'm not thinking of
right now.

-- 
see shy jo

Attachment: signature.asc
Description: Digital signature


Reply to: