Bug#23712: conflicting packages with the same conffile
On Wed, 18 Aug 2010, Russ Allbery wrote:
> Yann Dirson <firstname.lastname@example.org> writes:
> > Richard Braakman writes:
> >> Yesterday I noticed that Debian policy is incorrect on this:
> >> Only packages that are tagged *conflicting* with each other may
> >> specify the same file as `conffile'. A package may not modify a
> >> configuration file of another package.
> >> (section 3.3.7)
> > Yes, this should be raised on deb-policy I think.
> This is now 10.7.4, but the same issue is still there. The concern is
> that conffiles remain even after the package is removed, so conflicts may
> be insufficiently strong and packages may simply never be able to use the
> same conffile as another package whether they declare conflicts or not.
I'm not sure that this is really the original concern. The initial report
wanted lintian to warn when two packages share the same conffile even if they
conflict... presumably because he thought that installing them would
result in an error. The fact that it does not might invalidate the report
> What happens if you have a package on the system that's removed but not
> purged and you install another package (conflicting with the first) that
> contains the same conffile? I suspect the conffile will be treated as
> locally modified and the newly installed package will get the conffile
> from the old removed package, but I'm not sure.
The conffile is taken over. The new version of the conffile is installed
and overwrites the previous one if it has not been modified (i.e. it
matches the md5sum recorded by the original package) otherwise you get the
usual prompt and the user decides which version is installed. This happens
with or without a Conflicts declaration.
We have a bug open against dpkg as well:
It mainly argues that dpkg should warn that the conffile is transferred
and that it should deal correctly with preserving user changes (which it
does nowadays apparently).
The fact that packages are marked as conflicting will just force apt to
remove it first, which means that the remaining conffille can then be
taken over even without a Replaces.
Given how little problem this behaviour has caused us, we might want as well
to document the current behaviour and make it policy rather than changing
a behaviour that has not been hurting us.
Anyone that wants to experiment with this can use the dpkg test-suite,
I have just added the corresponding tests:
Raphaël Hertzog ◈ Debian Developer ◈ [Flattr=20693]
Follow my Debian News ▶ http://RaphaelHertzog.com (English)
▶ http://RaphaelHertzog.fr (Français)