Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1549851 - [dnf] no dependency resolution details
Summary: [dnf] no dependency resolution details
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: rpm-software-management
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1148627 (view as bug list)
Depends On:
Blocks: 1266761 1162409 1213995 1224466 1268174 1300669 rel-eng-dnf
TreeView+ depends on / blocked
 
Reported: 2018-02-27 21:41 UTC by Carl George
Modified: 2021-06-12 15:00 UTC (History)
20 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 Carl George 2018-02-27 21:41:11 UTC
This is a continuation of bug 1148627.  I was asked to create a new bug.  DNF provides less information about how dependencies are resolved than Yum did.  The previous output from Yum was routinely useful for debugging packaging issues, and I would like to see equivalent functionality added to DNF.

To demonstrate, I created three minimal RPMs: spam, libham, and libeggs.  spam requires libham, and libham requires libeggs.

I will split my examples up into separate comments for clarity.

yum: comment 1
yum debug: comment 2

dnf: comment 3
dnf verbose: comment 4

Comment 1 Carl George 2018-02-27 21:42:45 UTC
Installing spam with yum, even without additional debug flags, clearly shows that spam requires libham, and libham requires libeggs.


[root@f28 ~]# yum-deprecated install spam
Yum command has been deprecated, use dnf instead.
See 'man dnf' and 'man yum2dnf' for more information.

Resolving Dependencies
--> Running transaction check
---> Package spam.noarch 0:0-0.fc28 will be installed
--> Processing Dependency: libham for package: spam-0-0.fc28.noarch
--> Running transaction check
---> Package libham.noarch 0:0-0.fc28 will be installed
--> Processing Dependency: libeggs for package: libham-0-0.fc28.noarch
--> Running transaction check
---> Package libeggs.noarch 0:0-0.fc28 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===================================================================================
 Package           Arch             Version              Repository           Size
===================================================================================
Installing:
 spam              noarch           0-0.fc28             carl-test           6.2 k
Installing for dependencies:
 libeggs           noarch           0-0.fc28             carl-test           6.2 k
 libham            noarch           0-0.fc28             carl-test           6.2 k

Transaction Summary
===================================================================================
Install  1 Package (+2 Dependent packages)

Total download size: 19 k
Installed size: 0  
Is this ok [y/d/N]:

Comment 2 Carl George 2018-02-27 21:43:55 UTC
Giving yum a higher debuglevel appropriately gives more detail.


[root@f28 ~]# yum-deprecated --debuglevel 5 install spam
Yum command has been deprecated, use dnf instead.
See 'man dnf' and 'man yum2dnf' for more information.

Config time: 0.003
Yum version: 3.4.3
rpmdb time: 0.000
Setting up Package Sacks
pkgsack time: 0.005
Obs Init time: 0.147
Resolving Dependencies
--> Running transaction check
---> Package spam.noarch 0:0-0.fc28 will be installed
Checking deps for spam.noarch 0:0-0.fc28 - u
looking for ('libham', None, (None, None, None)) as a requirement of spam.noarch 0:0-0.fc28 - u
spam-0-0.fc28.noarch requires: libham
--> Processing Dependency: libham for package: spam-0-0.fc28.noarch
Searching pkgSack for dep: libham
Building updates object
up:simple updates time: 0.004
up:obs time: 0.005
up:condense time: 0.000
updates time: 0.232
TSINFO: Marking libham-0-0.fc28.noarch as install for spam-0-0.fc28.noarch
--> Running transaction check
---> Package libham.noarch 0:0-0.fc28 will be installed
Checking deps for libham.noarch 0:0-0.fc28 - u
looking for ('libeggs', None, (None, None, None)) as a requirement of libham.noarch 0:0-0.fc28 - u
libham-0-0.fc28.noarch requires: libeggs
--> Processing Dependency: libeggs for package: libham-0-0.fc28.noarch
Searching pkgSack for dep: libeggs
TSINFO: Marking libeggs-0-0.fc28.noarch as install for libham-0-0.fc28.noarch
--> Running transaction check
---> Package libeggs.noarch 0:0-0.fc28 will be installed
Checking deps for libeggs.noarch 0:0-0.fc28 - u
--> Finished Dependency Resolution
Dependency Process ending
Depsolve time: 0.301

Dependencies Resolved

===================================================================================
 Package           Arch             Version              Repository           Size
===================================================================================
Installing:
 spam              noarch           0-0.fc28             carl-test           6.2 k
Installing for dependencies:
 libeggs           noarch           0-0.fc28             carl-test           6.2 k
 libham            noarch           0-0.fc28             carl-test           6.2 k

Transaction Summary
===================================================================================
Install  1 Package (+2 Dependent packages)

Total download size: 19 k
Installed size: 0  
Is this ok [y/d/N]:

Comment 3 Carl George 2018-02-27 21:45:30 UTC
On the other hand, installing spam with dnf doesn't give any dependency resolution information.

[root@f28 ~]# dnf install spam
Last metadata expiration check: 0:01:42 ago on Tue 27 Feb 2018 02:43:12 PM CST.
Dependencies resolved.
===================================================================================
 Package           Arch             Version              Repository           Size
===================================================================================
Installing:
 spam              noarch           0-0.fc28             carl-test           6.2 k
Installing dependencies:
 libeggs           noarch           0-0.fc28             carl-test           6.2 k
 libham            noarch           0-0.fc28             carl-test           6.2 k

Transaction Summary
===================================================================================
Install  3 Packages

Total download size: 19 k
Installed size: 0  
Is this ok [y/N]:

Comment 4 Carl George 2018-02-27 21:46:46 UTC
Passing the `--verbose` flag to dnf doesn't give me any more information regarding the dependency resolution, it just repeats what packages will be installed, which doesn't help.  Neither `--debuglevel` or `--errorlevel` add additional dependency resolution information.


[root@f28 ~]# dnf --verbose install spam
Loaded plugins: builddep, config-manager, copr, debug, debuginfo-install, download, generate_completion_cache, needs-restarting, playground, repoclosure, repograph, repomanage, reposync
DNF version: 2.7.5
cachedir: /var/cache/dnf
repo: using cache for: carl-test
not found deltainfo for: Carl's test repo
not found updateinfo for: Carl's test repo
carl-test: using metadata from Tue 27 Feb 2018 02:41:15 PM CST.
repo: using cache for: rawhide
not found deltainfo for: Fedora - Rawhide - Developmental packages for the next Fedora release
not found updateinfo for: Fedora - Rawhide - Developmental packages for the next Fedora release
rawhide: using metadata from Tue 20 Feb 2018 03:16:01 AM CST.
Last metadata expiration check: 0:01:54 ago on Tue 27 Feb 2018 02:43:12 PM CST.
--> Starting dependency resolution
---> Package spam.noarch 0-0.fc28 will be installed
---> Package libham.noarch 0-0.fc28 will be installed
---> Package libeggs.noarch 0-0.fc28 will be installed
--> Finished dependency resolution
Dependencies resolved.
===================================================================================
 Package           Arch             Version              Repository           Size
===================================================================================
Installing:
 spam              noarch           0-0.fc28             carl-test           6.2 k
Installing dependencies:
 libeggs           noarch           0-0.fc28             carl-test           6.2 k
 libham            noarch           0-0.fc28             carl-test           6.2 k

Transaction Summary
===================================================================================
Install  3 Packages

Total download size: 19 k
Installed size: 0  
Is this ok [y/N]:

Comment 5 Carl George 2018-02-27 21:48:18 UTC
This is a contrived example, since I can easily use repoquery to see that spam requires libham and libham requires libeggs.  But real packages routinely have much larger dependencies chains, especially when installing in minimal containers.  It gets even more complex with virtual provides, automatically added provides/requires, and requirement version restrictions.

Please give me a way to get useful dependency resolution information out of DNF.

Comment 6 Carl George 2018-02-27 21:55:13 UTC
*** Bug 1148627 has been marked as a duplicate of this bug. ***

Comment 7 Jaroslav Mracek 2018-02-28 08:36:45 UTC
Thanks for the report and we will see, what libsolv can provide for the case.

Comment 8 Ian Pilcher 2018-03-01 14:51:24 UTC
It's worth noting that the information that yum provided is most useful when there is a missing or unexpected dependency (why did installing foo pull in 350 unexpected packages?).

Comment 9 Paul Howarth 2018-03-23 16:13:12 UTC
It's also very useful when a package "provides" something that it shouldn't be doing, and as a result gets installed instead of something else (the thing that's expected to satisfy the "provide"). I've seen this with perl packages occasionally and can be very tricky to debug.

Comment 10 Vít Ondruch 2019-03-09 11:31:21 UTC
There are also other cases, e.g. running `dnf update`, it tries to install:

~~~
Installing weak dependencies:
  mkpasswd                        x86_64 5.4.1-3.fc31
rawhide                 39 k
~~~

Trying to query for weak dependencies, nothing requires it:

~~~
$ sudo dnf repoquery --whatrecommends mkpasswd
Last metadata expiration check: 0:07:13 ago on Fri Mar  8 23:51:51 2019.

$ sudo dnf repoquery --supplements mkpasswd
Last metadata expiration check: 0:07:53 ago on Fri Mar  8 23:51:51 2019. 
~~~

This is very annoying. In ML thread [1], I was told that this is the command to get the dependency:

~~~
$ dnf repoquery --disablerepo=\* --enablerepo=koji-31 --provides mkpasswd 2>/dev/null | while read f ; do echo -n -e "$f\t" ; dnf repoquery --disablerepo=\* --enablerepo=koji-31 --whatrecommends "$f" 2>/dev/null ; echo ; done
mkpasswd = 5.4.1-3.fc31   
mkpasswd(x86-64) = 5.4.1-3.fc31   
whois-mkpasswd = 5.4.1-3.fc31    libxcrypt-0:4.4.4-1.fc31.x86_64 
~~~

But really? This is awful :/

[1] https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/SH4GC7HAEOV67UQ2QLV26XQ4S6RNQXOH/

Comment 11 Robin Lee 2019-12-14 16:48:08 UTC
Vote for this. It's a regression compared with yum.

Comment 12 Kirby Zhou 2020-03-21 15:52:58 UTC
vote for this, it confused me long time.

Comment 13 James Cassell 2021-04-30 00:34:49 UTC
Would be helpful to find out why upgrades of grub2 pull in extra deps, but a fresh install doesn't: https://bodhi.fedoraproject.org/updates/FEDORA-2021-ea80a01b49#comment-2001564

[root@f34 /]# yum upgrade --advisory=FEDORA-2021-ea80a01b49
Last metadata expiration check: 0:01:29 ago on Mon Apr 26 15:15:58 2021.
Dependencies resolved.
============================================================
 Package             Arch   Version           Repo     Size
============================================================
Upgrading:
 grub2-common        noarch 1:2.06~rc1-4.fc34 updates 934 k
 grub2-efi-x64       x86_64 1:2.06~rc1-4.fc34 updates 499 k
 grub2-tools         x86_64 1:2.06~rc1-4.fc34 updates 1.9 M
 grub2-tools-minimal x86_64 1:2.06~rc1-4.fc34 updates 612 k
Installing dependencies:
 freetype            x86_64 2.10.4-3.fc34     fedora  394 k
 graphite2           x86_64 1.3.14-7.fc34     fedora   95 k
 grub2-tools-efi     x86_64 1:2.06~rc1-4.fc34 updates 552 k
 grub2-tools-extra   x86_64 1:2.06~rc1-4.fc34 updates 855 k
 harfbuzz            x86_64 2.7.4-3.fc34      fedora  634 k
 libpng              x86_64 2:1.6.37-10.fc34  fedora  119 k

Transaction Summary
============================================================
Install  6 Packages
Upgrade  4 Packages

Total download size: 6.4 M

Comment 14 Vít Ondruch 2021-04-30 10:43:52 UTC
(In reply to James Cassell from comment #13)

https://bugzilla.redhat.com/show_bug.cgi?id=1953368


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