Search code examples
debianaptdebian-buster

Debian control files for version strictly less than producing hard-to understand error message


I am writing a debian package which depends on python3-django.

The control file contains the line:

Depends: python3-django (>= 1.11), python3-django (<< 2)

And when I try to install the package, the error message I get is:

mypackagename: Depends: python3-django (< 2) but 1:1.11.28-1~deb10u1 is to be installed

To my mind, that version number that is being given for Django should parse as being lower, but for some reason isn't. If someone could advise me what mistake or gotcha I am missing here, I would be grateful.


Solution

  • The version of python3-django you are trying to install is not 1.11.28-1~deb10u1 (which would indeed fall within the [1.11..<< 2) range), but 1:1.11.28-1~deb10u1.

    The number before the : is called the epoch, and it takes precedence over whatever comes after it (that is: it is a number that has a higher precedence than the major version number). The default epoch is 0, and your versioned depends use this default epoch.

    So the check is really whether 1:1.11.28-1~deb10u1 is >= 0:1.11 (which is true) and << 0:2 which is false and which is what the error is telling you.