On Wed, Dec 03, 2003 at 05:49:20PM +0100, Andreas Metzler wrote:
> exim4 is a metapackage that depends on the other three and is not hit by
> the problem. The rest is a straighforward chain.
> 
> daemon -->-- -base -->-- -config.
> other possible dependencies would be:
> daemon -->--  -config -->-- -base
> or
> daemon -->-- -base
>    `---->--  -config
> The daemon-packages provide/conflict/replaces MTA.

On Wed, Dec 03, 2003 at 04:41:00PM +0100, Marc Haber wrote:
> This causes dselect to install exim4-base and exim4-config on a system
> that has some other (non-exim) MTA installed, which is a bad thing.

I'm going to ignore the -config package, since it's not really part of
the problem.

Okay, so you want to say:

        * any exim4-daemon package should only be installed when exim4-base
          is already installed and setup
        * exim4-base and shouldn't be installed when another MTA
          is installed
        * exim4-base shouldn't be installed when exim4-daemon isn't going
          to be installed

Ideally you'd have a dep loop here: exim4-daemon deps exim4-base and
vice-versa. There are two options that can make that work, one is a
Pre-Depends: (avoid if possible, but maybe not unreasonable), the other
is to ensure that exim4-base (and config) is "configured" first, which
can be done by having them not have a postinst script. That mightn't be
good enough.

If those solutions aren't possible, then you can have exim4-base installed
without an exim4 daemon. To avoid having another MTA installed, you have
to have a Conflicts: m-t-a. You thus also have to have a Provides: m-t-a.
But then you have to provide /usr/sbin/sendmail, which means you need
a daemon installed.

So you're back to needing the circular dependencies.

Personally, I'd suggest not having the separate -config package; and
letting sites do their own exim configurations manually, rather than by
creating a replacement -config package. Then you should be able to set
things up so that:

        exim4-daemon
                - has a postinst which starts the daemon
                - Provides/Conflicts: m-t-a
                - Depends: exim4-base
        exim4-base
                - has no postinst
                - needs no configuration
                - provides common support files
                - Depends: exim4-daemon

Having a check to say "/etc/exim/exim.conf already exists? well, obviously
you don't need any help" and not asking any debconf questions is one
way that should work, specifically asking "do you want to configure exim
manually?" is another.

If that's really out of the question, and the -config or -base package needs
a postinst atm, a Pre-Depends is probably the best option.

Cheers,
aj

-- 
Anthony Towns <[EMAIL PROTECTED]> <http://azure.humbug.org.au/~aj/>
I don't speak for anyone save myself. GPG signed mail preferred.

               Linux.conf.au 2004 -- Because we can.
           http://conf.linux.org.au/ -- Jan 12-17, 2004

Attachment: pgp4QJffJQsl2.pgp
Description: PGP signature

Reply via email to