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

Bug#23712: conflicting packages with the same conffile



On Wed, 18 Aug 2010, Russ Allbery wrote:
> Yann Dirson <ydirson@mygale.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
entirely.

> 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:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=163183

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:
http://git.debian.org/?p=dpkg/pkg-tests.git;a=commit;h=cb49886e1b1da2f86f6894eb3d754673b37380e0

Cheers,
-- 
Raphaël Hertzog ◈ Debian Developer ◈ [Flattr=20693]

Follow my Debian News ▶ http://RaphaelHertzog.com (English)
                      ▶ http://RaphaelHertzog.fr (Français)



Reply to: