Hi,

On 6/28/23 13:05, Russ Allbery wrote:

In that case, I don't actually know why we usually use Conflicts with
Replaces.  Maybe we don't really need to?

Replaces+Conflicts together has a special meaning, that is used for replacing a package completely in an atomic operations, such as when a package is being renamed.

Replaces alone defines how file conflicts are to be resolved. Conflicts alone stops installation if the conflicting package is still installed, and the frontend is responsible for uninstalling the other package first. With both Replaces and Conflicts, the new package can be installed over the old one, causing the old package to be deinstalled at the same time, but only if unpacking the new package succeeds.

This is very useful for replacing a package that other packages depend on without going through an invalid state that needs --force to get to.

Policy 7.4 specifies this behaviour.

   Simon

Reply via email to