I am creating a Debian package foo
which needs to replace an existing package bar
on systems on which it is installed.
I've read:
https://www.debian.org/doc/debian-policy/ch-relationships.html
And concluded that the correct clauses in the DEBIAN/control
should look like:
Provides: foo
Conflicts: bar
Replaces: bar
However, when I try to install the foo
package on a system that already has bar
installed, the system balks because foo
conflicts with bar
.
If I remove the Conflicts: bar
entry then dpkg
allows both packages to be installed side-by-side, which is a problem since foo
must replace bar
.
What are the proper control
file clauses to achieve this?
I've tried Breaks
instead of Conflicts
:
dpkg: regarding foo_DEV-22._i386.deb containing foo:
foo breaks bar
bar (version 3.2.2.1-x86NX4.4-x86) is present and installed.
bar provides bar and is present and installed.
dpkg: error processing foo_DEV-22._i386.deb (--install):
installing foo would break existing software
Errors were encountered while processing:
foo_DEV-22._i386.deb