Package: libdevmapper1.02.1
Version: 2.02.66-2
libdevmapper1.02.1 depends on dmsetup since version 2.02.66-2. The
dependency was added to fix #585786. There, the issue was that the
libdevmapper1.02.1 version did not match the dmsetup version. As a
result, this dependency was added.
However, shared libraries should not depend on tools. The higher level
users of libraries should have these dependencies. In this case,
libdevmapper1.02.1 does not actually need a matching dmsetup to be
useable. It should prevent installing a dmsetup of a different version
though. The correct relationship for achieving that is Breaks.
The changelog argues that libdevmapper1.02.1 needs udev rules. That is a
red herring as neither libdevmapper1.02.1 nor dmsetup depends on udev.
The presence of the rules is only relevant if udev happens to be
installed.
As such I propose to change libdevmapper1.02.1's "Depends: dmsetup (>=
${devmapper:Version}~)" to "Breaks: dmsetup (<< ${devmapper:Version}~)".
This has practical relevance. systemd depends on libcryptsetup12, which
depends on libdevmapper1.02.1, which depends on dmsetup. Therefore
systemd always pulls dmsetup. This is undesirable for embedded systems
and container images.
Helmut