创建一个依赖于包 A 或 B 的 deb 软件包。

我创建了一个deb包,其中包含以下内容:
Package: foo
Depends: libssl1.0.1 (>= 1.0.1)

这在trustyjessie上运行得很好,但在zesty上不起作用,因为libssl1.0.2是一个与libssl1.0.1不同的软件包。
有没有办法在deb软件包上指定依赖于libssl1.0.1libssl1.0.2?或者是否有其他解决方法,而不是创建两个不同的deb软件包?
1个回答

Debian政策手册,第7章:声明软件包之间的关系中得知:

In the Depends, Recommends, Suggests, Pre-Depends, Build-Depends, Build-Depends-Indep and Build-Depends-Arch control fields of the package, which declare dependencies on other packages, the package names listed may also include lists of alternative package names, separated by vertical bar (pipe) symbols |. In such a case, that part of the dependency can be satisfied by any one of the alternative packages.

[...]

For example, a list of dependencies might appear as:

Package: mutt
Version: 1.3.17-1
Depends: libc6 (>= 2.2.1), exim | mail-transport-agent
所以,大概是这样的:
Depends: libssl1.0.1 (>= 1.0.1) | libssl1.0.2

如果你希望你的软件包依赖于 A 或者 (B 和 C),请使用 A | B, A | C。例如,qt5-default (>= 5.2.1) | qtbase5-dev, qt5-default (>= 5.2.1) | qtchooser (>= 55-gc9562a1-1~)。 - PolyGlot