如何指定包的 2 个版本之间的依赖关系?

dv3*_*0ea 7 packaging dependencies

debian/control文件中,如何指定该包的 2 个版本之间对该包的依赖关系?

例如:python 2.5 或更高但低于 python 2.7。

Depends: python ($VERSION_STRING)
Run Code Online (Sandbox Code Playgroud)

$VERSION_STRING是什么?

Ste*_*zzo 4

版本依赖性的运算符是:

>>  Greater than, but not equal to
>=  Greater than or equal to
=
<=
<<
Run Code Online (Sandbox Code Playgroud)

(注意<and >,意思是<=>=也有效,但它们被贬低了)

因此,为了声明您的示例,您需要添加两个依赖项:

Depends: python (>= 2.5), python (<< 2.7)
Run Code Online (Sandbox Code Playgroud)

有关依赖声明的完整描述,请参阅Debian 策略手册,第 7 章。如果您想了解一些用途,请参阅这个随机示例