Bug 2186544

Summary: why can't dnf output errors?
Product: [Fedora] Fedora Reporter: Harald Reindl <h.reindl>
Component: dnf5Assignee: rpm-software-management
Status: NEW --- QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 37CC: daniel.mach, jkolarik, jmracek, jrohel, mblaha, nsella, packaging-team-maint, pkratoch, rpm-software-management, vmukhame
Target Milestone: ---Keywords: 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: 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:

Description Harald Reindl 2023-04-13 16:42:24 UTC
"yum" was able for many years to even dispaly which package of a transaction pulls a specific library as dep in normal updates - dnf don't output anything useful 

even not if it can't solve deps

[root@honeypot:~]$ rm -rf /var/cache/dnf/*

[root@honeypot:~]$ dnf --releasever=37 distro-sync
Buildserver @thelounge.net 37 - x86_64                                                                                                            1.8 MB/s | 145 kB     00:00
Lounge-Cache @thelounge.net 37 - x86_64                                                                                                            13 MB/s | 1.1 MB     00:00
Buildserver @thelounge.net 37 - mtune=native                                                                                                      1.1 MB/s |  85 kB     00:00
Error:
 Problem: The operation would result in removing the following protected packages: lounge-honeypot
(try to add '--skip-broken' to skip uninstallable packages)

[root@honeypot:~]$ dnf --releasever=37 --skip-broken distro-sync
Last metadata expiration check: 0:00:12 ago on Thu Apr 13 18:39:26 2023.
Error:
 Problem: The operation would result in removing the following protected packages: lounge-honeypot

 [root@honeypot:~]$ dnf -v --releasever=37 --skip-broken distro-sync
Loaded plugins: builddep, changelog, config-manager, copr, debug, debuginfo-install, download, generate_completion_cache, groups-manager, leaves, needs-restarting, playground, repoclosure, repodiff, repograph, repomanage, reposync, show-leaves
DNF version: 4.14.0
cachedir: /var/cache/dnf
User-Agent: constructed: 'libdnf (Generic 36; generic; Linux.x86_64)'
repo: using cache for: lounge-buildserver
lounge-buildserver: using metadata from Thu Apr 13 18:06:40 2023.
repo: using cache for: lounge-cache
lounge-cache: using metadata from Thu Apr 13 18:06:38 2023.
repo: using cache for: lounge-native
lounge-native: using metadata from Thu Apr 13 18:06:40 2023.
Last metadata expiration check: 0:00:29 ago on Thu Apr 13 18:39:26 2023.
--> Starting dependency resolution
--> Finished dependency resolution
Error:
 Problem: The operation would result in removing the following protected packages: lounge-honeypot

Comment 1 Jaroslav Mracek 2023-04-17 17:08:21 UTC
We will try to resolve the problem in DNF5. The problem with reports is that time to time libsolv (our solver) returns messages that are confusing but technically correct.

DNF is going to be replaced by DNF5 (fedora 39) therefore it would be better to fix it in DNF5

Comment 2 Harald Reindl 2023-04-17 19:30:31 UTC
> The problem with reports is that time to time libsolv (our solver) 
> returns messages that are confusing but technically correct

no matter how confusing a message is - it's more helpful as "don't work"

what problem do you think to solve by hide them?
if i don't understand them i can google
if i don't have them i can't do anything

the "confusing" messages at depsolv 15 years ago teached me to learn how rpm dependencies are woriking and where useful to avoid useless deps when you can abort because you decide to completly remove the package pulling a whole chain of libs