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: dnf5
Version: 42
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: rpm-software-management
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-10-05 19:26 UTC by Miro Hrončok
Modified: 2025-02-26 12:52 UTC (History)
15 users (show)

Fixed In Version:
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.

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.

Comment 4 Aoife Moloney 2024-11-08 10:44:46 UTC
This message is a reminder that Fedora Linux 39 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 39 on 2024-11-26.
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 '39'.

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 39 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.

Comment 5 Miro Hrončok 2024-11-08 15:06:22 UTC
This is still the case in dnf5.

Comment 6 Aoife Moloney 2025-02-26 12:52:47 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 42 development cycle.
Changing version to 42.


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