RPM version range dependencies on virtual packages do not work

Craig Ringer
Craig Ringer

Attempting to use rpm version-range dependencies with dependencies provided by virtual packages does not work as expected and will result in build failures or uninstallable packages.

If you have package mypkg with a .spec dependency declaration like:

BuildRequires: otherpkg >= 4.1
BuildRequires: otherpkg < 5.0

and you have package versions 4.1, 4.2, 4.9 and 5.0 available, you would expect yum or dnf to select the newest version satisfying the constraints - version 4.9.

In fact, you will most likely get errors where yum/dnf tries to install both version 4.1 and 4.9.

So far I've only seen/verified this in a slightly more complex case where mypkg had a versioned dependency on otherpkg and otherpkg-child; otherpkg also depends on otherpkg-child by exact version equality. Both otherpkg and otherpkg-child are versioned Provides, virtual packages.

If you're getting errors like

Finished Dependency Resolution
Error: Package: otherpkg-child 4.1
Requires: otherpkg 4.9
Available: ... long list here ...
Installing: otherpkg 4.1

or similar, you might be seeing this issue.

Was this article helpful?

0 out of 0 found this helpful