[Pkg-rust-maintainers] Bug#901827: dpkg: Support two-sided version constraint ranges, required to properly translate Cargo dependencies
josh at joshtriplett.org
Tue Jun 19 22:47:00 BST 2018
On Tue, Jun 19, 2018 at 08:23:00PM +0000, Ximin Luo wrote:
> Anyway, we have a solution on the dpkg bug report that is somewhere halfway between the old and the current approach. I think it will work. It is to declare Provides: A (= X.Y.Z), A-X (= X.Y.Z), A-X.Y (= X.Y.Z) for all packages, then generate a list-of-OR-clauses for every cargo dependency that exactly matches the selected range, e.g. >= 6.1 << 9.5 gets turned into X-6 (>= 6.1) | X-7 | X-8 | X-9 (<< 9.5) and >> 9 simply gets turned into X (>> 9).
That sounds ideal! And needing multiple branches of the OR clause should
almost never happen, unless someone has a version constraint spanning
major versions. The common case of a "compatible" dependency like
X="~1.2" should just turn into "X-1 (>= 1.2)" (and X="~0.5" turns into
Thank you for iterating on this; this solution sounds much better.
- Josh Triplett
More information about the Pkg-rust-maintainers