Bug 2132462

Summary: repoquery --whatrequires returns packages with unmet conditional dependencies
Product: [Fedora] Fedora Reporter: Miro Hrončok <mhroncok>
Component: dnfAssignee: rpm-software-management
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 39CC: daniel.mach, jmracek, jrohel, maxwell, mblaha, mhatina, omosnacek, packaging-team-maint, pkratoch, ppisar, rpm-software-management, vmukhame, vondruch
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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 Miro Hrončok 2022-10-05 19:26:51 UTC
Description of problem:
413 packages in rawhide-source BuildRequire exactly: (python3dist(toml) if python3-devel < 3.11)

python3dist(toml) is provided by python3-toml



When I repoquery:

$ repoquery --repo=rawhide{,-source} --whatrequires python3-toml

I get all of them in the results, regardless of my version of python3-devel < 3.11.


Here is Fedora 35, with python3-devel 3.10 installed:

$ repoquery -q --repo=rawhide{,-source} --whatrequires python3-toml | wc -l
443

Examining one of the packages:

$ repoquery -q --repo=rawhide{,-source} --whatrequires python3-toml | grep rust-packaging
rust-packaging-0:22-3.fc38.src
$ repoquery -q --repo=rawhide-source --requires rust-packaging-0:22-3.fc38.src | grep toml
(python3dist(toml) if python3-devel < 3.11)

We see it only requires python3-toml via this conditional dependency.


Here is Fedora 35 with an alternate installroot set:

$ repoquery --releasever=rawhide --installroot ~/tmp/non-existent  -q --repo=rawhide{,-source} --whatrequires python3-toml | wc -l
443


Here is Fedora 38 (Rawhide) with no python3-devel installed:


[root@4c7583812bc0 /]# rpm -q python3-devel
package python3-devel is not installed
[root@4c7583812bc0 /]# dnf repoquery -q --repo=rawhide{,-source} --whatrequires python3-toml | wc -l
443

Here is Fedora 38 (Rawhide) with no python3-devel 3.11 installed:

[root@4c7583812bc0 /]# rpm -q python3-devel
python3-devel-3.11.0~rc2-1.fc38.x86_64
[root@4c7583812bc0 /]# dnf repoquery -q --repo=rawhide{,-source} --whatrequires python3-toml | wc -l
443


Version-Release number of selected component (on Fedora 35):
libdnf-0.68.0-1.fc35.x86_64
dnf-4.14.0-1.fc35.noarch
rpm-4.17.1-3.fc35.x86_64

Version-Release number of selected component (on Fedora 38):
libdnf-0.68.0-1.fc38.x86_64
dnf-4.14.0-1.fc38.noarch
rpm-4.18.0-2.fc38.x86_64


How reproducible: see above
Steps to Reproduce: see above

Actual results:
packages with only this requirement: (python3dist(toml) if python3-devel < 3.11)
show up in --whatrequires python3-toml, apparently regardless of the presence or version of python3-devel

Expected results:
packages with only this requirement: (python3dist(toml) if python3-devel < 3.11)
should only show up if python3-devel is installed and a lower version than 3.11
or at least only when the available (in the queried repo) version of python3-devel is lower than 3.11

Additional info:
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/VPCNXOJC3ZELDVQJDQVFGCLVG6PLQW32/

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

Comment 2 Jaroslav Mracek 2023-08-25 06:53:26 UTC
I think the issue is valid. Rich deps are problem for queries, but they are correctly solved by the solver.

Comment 3 Aoife Moloney 2024-05-07 15:50:40 UTC
This message is a reminder that Fedora Linux 38 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 38 on 2024-05-21.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '38'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 38 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.