Bug 2125298 - dnf describes a hard dependency as a weak dependency
Summary: dnf describes a hard dependency as a weak dependency
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 39
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-09-08 14:30 UTC by Terry Bowling
Modified: 2023-08-16 07:06 UTC (History)
11 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 Terry Bowling 2022-09-08 14:30:39 UTC
Description of problem:

There seems to be a hard dependency, though dnf reports it as a weak dependency.

[tbowling@fedora ~]$ sudo dnf upgrade
Dependencies resolved.
=================================================================================
 Package                     Architecture Version               Repository  Size
=================================================================================
Upgrading:
 curl                        x86_64       7.82.0-8.fc36         updates    308 k
 ibus-typing-booster         noarch       2.18.10-1.fc36        updates    1.0 M
 iwl100-firmware             noarch       39.31.5.1-138.fc36    updates    140 k
 iwl1000-firmware            noarch       1:39.31.5.1-138.fc36  updates    251 k
 iwl105-firmware             noarch       18.168.6.1-138.fc36   updates    219 k
 iwl135-firmware             noarch       18.168.6.1-138.fc36   updates    228 k
 iwl2000-firmware            noarch       18.168.6.1-138.fc36   updates    221 k
 iwl2030-firmware            noarch       18.168.6.1-138.fc36   updates    230 k
 iwl3160-firmware            noarch       1:25.30.13.0-138.fc36 updates    992 k
 iwl3945-firmware            noarch       15.32.2.9-138.fc36    updates     81 k
 iwl4965-firmware            noarch       228.61.2.24-138.fc36  updates     94 k
 iwl5000-firmware            noarch       8.83.5.1_1-138.fc36   updates    364 k
 iwl5150-firmware            noarch       8.24.2.2-138.fc36     updates    137 k
 iwl6000-firmware            noarch       9.221.4.1-138.fc36    updates    156 k
 iwl6000g2a-firmware         noarch       18.168.6.1-138.fc36   updates    336 k
 iwl6000g2b-firmware         noarch       18.168.6.1-138.fc36   updates    343 k
 iwl6050-firmware            noarch       41.28.5.1-138.fc36    updates    295 k
 iwl7260-firmware            noarch       1:25.30.13.0-138.fc36 updates    9.5 M
 iwlax2xx-firmware           noarch       20220815-138.fc36     updates     45 M
 libertas-usb8388-firmware   noarch       2:20220815-138.fc36   updates    105 k
 linux-firmware              noarch       20220815-138.fc36     updates    177 M
 linux-firmware-whence       noarch       20220815-138.fc36     updates     52 k
 protobuf-c                  x86_64       1.4.1-2.fc36          updates     39 k
Installing weak dependencies:
 amd-gpu-firmware            noarch       20220815-138.fc36     updates     14 M
 intel-gpu-firmware          noarch       20220815-138.fc36     updates    7.1 M
 nvidia-gpu-firmware         noarch       20220815-138.fc36     updates    1.2 M

Transaction Summary
=================================================================================
Install   3 Packages
Upgrade  23 Packages

Total download size: 259 M
Is this ok [y/N]: n
Operation aborted.


However, when I query all the different types of weak dependencies, only the --whatdepends is reported.  I assume that is a hard dependency rather than a weak dependency such as "suggests" or "supplements".

[tbowling@fedora ~]$ for i in --whatdepends --whatconflicts --whatenhances --whatrequires --whatsuggests --whatsupplements ; do echo $i; dnf repoquery $i amd-gpu-firmware;  done;
--whatdepends
Last metadata expiration check: 0:14:29 ago on Thu 08 Sep 2022 09:52:39 AM EDT.
linux-firmware-0:20220815-138.fc36.noarch
--whatconflicts
Last metadata expiration check: 0:14:30 ago on Thu 08 Sep 2022 09:52:39 AM EDT.
--whatenhances
Last metadata expiration check: 0:14:31 ago on Thu 08 Sep 2022 09:52:39 AM EDT.
--whatrequires
Last metadata expiration check: 0:14:32 ago on Thu 08 Sep 2022 09:52:39 AM EDT.
--whatsuggests
Last metadata expiration check: 0:14:33 ago on Thu 08 Sep 2022 09:52:39 AM EDT.
--whatsupplements
Last metadata expiration check: 0:14:33 ago on Thu 08 Sep 2022 09:52:39 AM EDT.

Comment 1 Terry Bowling 2022-09-08 15:17:31 UTC
OK, I now understand that this is problably not a bug, but a complicated user experience problem.

In this case, I have an Intel powered hardware.  So I wanted to understand what was depending on the amd and nvidia firmware packages to understand if I could exclude them.  Or if there was a bug I could report to correct dependencies meta data or help reduce package bloat installing unnecessary packages.

The dependencies are not obvious to understand without much though and many queries.

As a user, "weak dependencies" was not obvious to meant that encompassed --depends as well as suggests, supplements, and enhances.

It would be nice to have some "repoquery --show-dependencies PKGNAME" that show both directions and listed the type of dependencies for each.

To see the upstream/parent dependencies, I had to execute 2 commands for both the amd and nvidia packages (total of 4)
  # dnf repoquery --alldeps --whatrequires amd-gpu-firmware
  # dnf repoquery --alldeps --whatdepends amd-gpu-firmware

To see the downstream dependencies, I have to query every variation, because --depends does not tell my what type of weak dependency, nor hard dependency.  I thought --deplist would provide this, but it does not.
  # for i in --depends --requires --suggests --supplements --enhances; do echo $i; dnf repoquery $i linux-firmware; done;
--depends

Comment 2 Ben Cotton 2023-04-25 17:54:03 UTC
This message is a reminder that Fedora Linux 36 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 36 on 2023-05-16.
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 '36'.

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 36 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 3 Fedora Release Engineering 2023-08-16 07:06:02 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 39 development cycle.
Changing version to 39.


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