On Fri, Apr 23, 2010 at 09:27:32AM +0200, Raphaël Hertzog wrote:
> I stumbled upon policy 7.4:
> > A Conflicts entry should almost never have an "earlier than" version clause.
> > This would prevent dpkg from upgrading or installing the package which 
> > declared
> > such a conflict until the upgrade or removal of the conflicted-with package 
> > had
> > been completed. Instead, Breaks may be used. 

> Looking at this sentence it comes mostly unchanged from the original packaging
> manual (commit ff1bec10):
> -         A <tt>Conflicts</tt> entry should almost never have an
> -         `earlier than' version clause.  This would prevent
> -         <prgn>dpkg</prgn> from upgrading or installing the package
> -         which declared such a conflict until the upgrade or removal
> -         of the conflicted-with package had been completed.  This
> -         aspect of installation ordering is not handled by
> -         <prgn>dselect</prgn>, so that the use <tt>Conflicts</tt> in
> -         this way is likely to cause problems for `bulk run' upgrades
> -         and installations.

> I think using an earlier than clause is perfectly ok nowadays and it's
> possibly the right thing to do when moving files around between packages.

No, it definitely isn't ok.  Versioned conflicts still impose significant
constraints on calculating an upgrade path between releases and contribute
to upgrade failures.

> Up to now, I always used "Conflicts" for explicit file conflicts and used
> Breaks for other subtle breakages (interface/API change). So when moving files
> from one package to the other I used "Conflicts: previous (<< last-version)"
> and "Replaces: previous (<< last-version)" on the package where the files are.

"Conflicts" is always right for file conflicts, and in that case should also
*always* be accompanied by Replaces.  The biggest problem, which the Policy
wording tries to address, is the use of "bare" Conflicts, for things that
aren't file conflicts:  in that case, a versioned conflicts is almost always
wrong because what you really mean to express is a versioned Breaks.  And
it's *that* usage of versioned Conflicts which causes the most problem for
the package manager.

-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
slanga...@ubuntu.com                                     vor...@debian.org

Attachment: signature.asc
Description: Digital signature

Reply via email to