[英]How to make a Debian package depend on multiple versions of libboost
I have a debian/control file which includes: 我有一个debian / control文件,其中包括:
Build-Depends: ... libboost1.35-dev, libboost-date-time1.35-dev, ...
This stops the package from building on modern Ubuntu systems. 这将阻止软件包在现代Ubuntu系统上构建。
I could just change all the 1.35s for 1.38s and then it would work on modern Ubuntu, but not older versions. 我可以将所有1.35s更改为1.38s,然后它就可以在现代Ubuntu上运行,但不能在旧版本上运行。
I would like to do something like: 我想做类似的事情:
Build-Depends: ... libboost-dev (>=1.35), libboost-date-time-dev (>=1.35), ...
but it seems that the 1.35 is hardcoded into the package names. 但似乎1.35已硬编码到包名称中。 ie libbost1.35-dev is a different package from libboost1.38m not just a different version of the same package.
即libbost1.35-dev与libboost1.38m是不同的软件包,而不仅仅是同一软件包的不同版本。
Is my understanding correct here? 我的理解在这里是否正确? I can understand hardcoding major version numbers into the package name (if the new version's ABI breaks backward compatibility).
我可以理解将主要版本号硬编码到软件包名称中(如果新版本的ABI破坏了向后兼容性)。
Is there a way to write a Debian control file which allows a package to be depend on having a particular version of libboost or higher? 有没有一种写Debian控制文件的方法,该文件允许软件包依赖于特定版本的libboost或更高版本?
Thanks, 谢谢,
Chris. 克里斯。
You should "Depends: libboost-dev " unless there is a special reason to target for specific versions of Boost. 除非有特殊原因需要针对特定版本的Boost,否则您应该“ Depends: libboost-dev ”。 This
libboost-dev
package is a pseudo-package that pulls in the suitable version of libboost. 此
libboost-dev
软件包是伪软件包,可提取合适版本的libboost。
If you really want to target them specifically, use the "or" operator: 如果您确实要专门针对它们,请使用“或”运算符:
Depends: A | B | C
See: http://www.debian.org/doc/debian-policy/ch-relationships.html 参见: http : //www.debian.org/doc/debian-policy/ch-relationships.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.