Package: debian-policy
Severity: normal

Section 8.1 starts with the following:

+---
| The run-time shared library must be placed in a package whose name
| changes whenever the SONAME of the shared library changes. This
| allows several versions of the shared library to be installed at the
| same time [...]
+---

This has two issues:

1. It is not needed to change package names for this. One can also use
"Provides: <something-that-changes-with-soname>" and have packages
depend on that.

2. It does not allow coinstallability without other constraints. There
are several common patterns like depending on a libfoo-bin or
libfoo-common package which then would also be required to work with
both versions. I think I've also seen libfooX-bin packages that were
not coinstallable as helper binaries were not installed into a path
that changes with soname.

There is also a footnote that states

+---
| There are some exceptional situations in which co-installation of
| two versions of a shared library is not safe, and the new shared
| library package has to conflict with the previous shared library
| package. This is never desirable, since it causes significant
| disruption during upgrades and potentially breaks unpackaged
| third-party binaries, but is sometimes unavoidable. These situations
| are sufficiently rare that they usually warrant project-wide
| discussion, and are complex enough that the rules for them cannot be
| codified in Debian Policy.
+---

which seems to contradict current practice as I don't remember a
single project-wide discussion about -common or -bin packages cuasing
this. It also doesn't seem warranted for libraries with few reverse
dependencies.

So I suggest:

1. Policy should document current practices and also allow other
methods that ensure dependencies are satisfied. Note that some
ecosystems like Perl do similar things with perlapi-X (where different
perlapi-X providers are in general not coinstallable).

2. Coinstallability should be mentioned as a concern for libraries
with many reverse dependencies, but should explictly state that this
requires the entire dependency chain to be coinstallable. Note that
"Depends: libfoo-common (>= X)" runs into the risk that newer
libfoo-common packages break older library versions and are safe only
when extraordinary care is taken; the same is true for
"libfoo-bin". (One could use libfooX-common, libfooX-bin packages
where data and helper binaries are installed into paths that change
with the SONAME such as /usr/lib/libfooX/libfoo-helper.)

3. The footnote about "exceptional situations" should be removed.

Ansgar

Reply via email to