Sample Header Ad - 728x90

`apt` doesn't install dependency matching version range even when available

1 vote
0 answers
73 views
I'm having trouble understanding what apt is doing when specifying a version range. I have two packages, packageA and packageB. packageB depends on packageA but *requires* a specific version range. Keep in mind that I'm developing both packageA and packageB and package them in a .deb that I distribute on my repository. I have the following situation:
pi@raspberrypi:~ $ apt-cache policy packageA
packageA:
  Installed: (none)
  Candidate: 2.1.0-1
  Version table:
     2.1.0-1 500
        500 https://repo/artifactory/deb  develop/transportation/main arm64 Packages
     2.0.0-3 500
        500 https://repo/artifactory/deb  develop/transportation/main arm64 Packages
     2.0.0-1 500
        500 https://repo/artifactory/deb  develop/transportation/main arm64 Packages
and
pi@raspberrypi:~ $ apt-cache policy packageB
packageB:
  Installed: (none)
  Candidate: 2.0.0-SNAPSHOT
  Version table:
     2.0.0-SNAPSHOT 500
        500 https://repo/artifactory/deb  develop/transportation/main arm64 Packages
where:
pi@raspberrypi:~ $ apt depends packageB
packageB
  Depends: packageA (>= 2.0.0-1)
  Depends: packageA ( 2.0.0-SNAPSHOT @un puN Ib >
Broken packageB:arm64 Depends on packageA:arm64  (>= 2.0.0-1)
  Considering packageA:arm64 0 as a solution to packageB:arm64 9999
  Re-Instated packageA:arm64
Broken packageB:arm64 Depends on packageA:arm64  2.1.0-1 @un uN > (= 2.0.0-1 and < 2.1.0-1, so that it can be installed with any version of packageA` that satisfies the range.


I'm aware I can install this simply with:
apt install packageB packageA=2.0.0 ``` but the amount of packages I'm planning to set up would make this quite awkward to use (30+ packages)
Asked by mattdibi (209 rep)
Apr 8, 2025, 06:22 AM
Last activity: Apr 8, 2025, 08:19 AM