Issue
Is it valid to have multiple entries for the same dependency in a .deb package control file? I want to express that this package need a dependency with a version between two values. In the debian documentation could not find anything about that: https://www.debian.org/doc/debian-policy/ch-relationships.html
Package: tb-test
Version: 1.2.3.4
...
Depends: dependency-a (>= 1.2.3), dependency-a (<= 2.0.0)
Would the package manager evaluate that correctly?
Solution
Yes, dpkg
should handle that fine. It would just appear as two separate requirements, both of which would be satisfied by, for example, dependency-a 1.2.5
.
There are a few packages in the main Debian archive which do something similar. For example, as of now, libregexp-grammars-perl has a Depends:
on perl (>= 5.20) | perl (<< 5.18)
(perl but not any versions between 5.18 and 5.20). It's not exactly the same as what you want, but it ought to demonstrate that all the relevant automated tools have no problems with the same package name showing up multiple times in the dependency expression.
Answered By - the paul Answer Checked By - Willingham (WPSolving Volunteer)