如何使Debian软件包依赖于多个版本的libboost [英] How to make a Debian package depend on multiple versions of libboost

查看:231
本文介绍了如何使Debian软件包依赖于多个版本的libboost的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个debian /控制文件,其中包括:

I have a debian/control file which includes:

Build-Depends: ... libboost1.35-dev, libboost-date-time1.35-dev, ...

Ubuntu系统。

我可以更改所有1.35s的1.38s,然后它将适用于现代的Ubuntu,但不是较旧的版本。

I could just change all the 1.35s for 1.38s and then it would work on modern Ubuntu, but not older versions.

我想做一些像

Build-Depends: ... libboost-dev (>=1.35), libboost-date-time-dev (>=1.35), ...

但似乎将1.35硬编码到包名中。即libbost1.35-dev是与libboost1.38m不同的软件包,而不仅仅是同一个软件包的不同版本。

but it seems that the 1.35 is hardcoded into the package names. i.e. libbost1.35-dev is a different package from libboost1.38m not just a different version of the same package.

我的理解是否正确?我可以理解将主要版本号码重新编入包名称(如果新版本的ABI破坏向后兼容性)。

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).

有没有办法编写Debian控制文件,允许软件包依赖于具有特定版本的libboost或更高版本?

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?

谢谢,

Chris。 p>

Chris.

推荐答案

你应该依赖: libboost-dev ,除非有特殊原因针对特定版本的Boost。这个 libboost-dev 包是一个伪包,它提供了合适的libboost版本。

You should "Depends: libboost-dev" unless there is a special reason to target for specific versions of Boost. This libboost-dev package is a pseudo-package that pulls in the suitable version of libboost.

如果你真的想要具体定位,请使用或运算符:

If you really want to target them specifically, use the "or" operator:

Depends: A | B | C 

请参阅: http://www.debian.org/doc/debian-policy/ch-relationships.html

这篇关于如何使Debian软件包依赖于多个版本的libboost的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆