Bug 2132462 - repoquery --whatrequires returns packages with unmet conditional dependencies
Summary: repoquery --whatrequires returns packages with unmet conditional dependencies
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 38
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: rpm-software-management
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-10-05 19:26 UTC by Miro Hrončok
Modified: 2023-08-25 06:53 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.