Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I make a Debian package depend on another package with exactly the same version

I'm building a Debian package which gathers together a number of other closely tied packages by declaring them as dependencies. I want those dependencies to be exactly the same version as the package. Is there a way within the Debian build system to avoid hard coding this within the control file (aside from pre-processing the control file myself)?

Something like:

Depends: libfoo = ${version}, libbar = ${version}
like image 810
Schwern Avatar asked Dec 06 '25 09:12

Schwern


1 Answers

I'm maintaining zookeeper in Debian, binary package zookeeperd (with 'd' at the end) must depend on the exact same version of binary package zookeeper, so in debian/control I have:

Package: zookeeperd
Depends: ${misc:Depends}, zookeeper (= ${binary:Version}), lsb-base (>= 3.2-14)

See more on substitution variables in the Debian Policy, chapter 4.10.

like image 127
Thomas Koch Avatar answered Dec 09 '25 17:12

Thomas Koch



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!