It seems that dnf5 understands a package specification with a version relation: # dnf5 --disablerepo=rawhide --enablerepo=f38-build install 'rpm > 4' Updating and loading repositories: Repositories loaded. Package "rpm-4.18.0-9.fc38.x86_64" is already installed. Nothing to do. # dnf5 --disablerepo=rawhide --enablerepo=f38-build install 'rpm < 4' Updating and loading repositories: Repositories loaded. Failed to resolve the transaction: No match for argument: rpm < 4 But this feature is not documented in dnf5-specs(7) manual. The same probably applies to rich dependencies: # dnf5 --disablerepo=rawhide --enablerepo=f38-build install '(rpm > 4 with rpm < 5)' Updating and loading repositories: Repositories loaded. Nothing to do. # dnf5 --disablerepo=rawhide --enablerepo=f38-build install '(rpm > 5 with rpm < 4)' Updating and loading repositories: Repositories loaded. Failed to resolve the transaction: No match for argument: (rpm > 5 with rpm < 4) Observed in dnf5-5.0.1-1.fc38.x86_64.
This bug appears to have been reported against 'rawhide' during the Fedora Linux 38 development cycle. Changing version to 38.
Following PR was queued to fix this: https://github.com/rpm-software-management/dnf5/pull/415.