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
Summary: | [dnf] no dependency resolution details | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Carl George <carl> |
Component: | dnf | Assignee: | rpm-software-management |
Status: | CLOSED DUPLICATE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | rawhide | CC: | carl, fedoraproject, goeran, gregswift, ipilcher, jmracek, kirbyzhou, kparal, matyas, me, metherid, ossman, packaging-team-maint, paul, peter, robinlee.sysu, rpm-software-management, samuel-rhbugs, tmz, vmukhame, vondruch |
Target Milestone: | --- | Keywords: | FutureFeature, 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: | 2023-08-23 06:21:24 UTC | 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: | |||
Bug Depends On: | |||
Bug Blocks: | 1266761, 1162409, 1213995, 1224466, 1268174, 1300669, 1304261 |
Description
Carl George
2018-02-27 21:41:11 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]: 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]: 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]: 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]: 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. *** Bug 1148627 has been marked as a duplicate of this bug. *** Thanks for the report and we will see, what libsolv can provide for the case. 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?). 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. 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/ Vote for this. It's a regression compared with yum. vote for this, it confused me long time. 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 (In reply to James Cassell from comment #13) https://bugzilla.redhat.com/show_bug.cgi?id=1953368 I have a good news - there is a new feature in libsolv that allows to answer the question why package is in transaction run: # `dnf install <argument> --debugsolver` $ cd debugdata/rpms/ $ testsolv -W acpi-1.7-20.fc38.x86_64 testcase.t installed acpi-1.7-20.fc38.x86_64@fedora: job install one of acpi-1.7-20.fc38.x86_64 *** This bug has been marked as a duplicate of bug 1533878 *** |