Bug 2160420

Summary: dnf5-specs(7) does not mention relations (name > version) and rich dependencies
Product: [Fedora] Fedora Reporter: Petr Pisar <ppisar>
Component: dnf5Assignee: Jan Kolarik <jkolarik>
Status: CLOSED COMPLETED QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 38CC: jkolarik, nsella, pkratoch, rpm-software-management
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: dnf5-5.0.8-1.fc38 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-06-29 12:25:23 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Petr Pisar 2023-01-12 11:25:41 UTC
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.

Comment 1 Ben Cotton 2023-02-07 15:05:18 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 38 development cycle.
Changing version to 38.

Comment 2 Jan Kolarik 2023-03-30 10:37:05 UTC
Following PR was queued to fix this: https://github.com/rpm-software-management/dnf5/pull/415.