dnf5
dnf5 copied to clipboard
reducing duplicate information in upgrade output
I noticed in the output of dnf5 upgrade
there is quite a bit of duplicated information as compared to the output of dnf upgrade
.
- example dnf output
=======================================================================================================
Package Architecture Version Repository Size
=======================================================================================================
Upgrading:
filesystem x86_64 3.18-4.fc39 rawhide 1.1 M
- example dnf5 output
Package Arch Version Repository Size
Upgrading:
filesystem x86_64 3.18-4.fc39 rawhide 106.0 B
replacing filesystem x86_64 3.18-3.fc38 rawhide 106.0 B
Having two lines for every package with (usually) duplicated information is a lot of visual noise. For updates with many packages it makes it difficult to parse the given information quickly. While I understand that each of these fields can technically have a different value, most of this information is usually the same and not that useful to always show.
My first instinct is can we make the default dnf5 output more terse, closer to the dnf output, with just information about the new package? The more detailed output (the "replacing" line) could be available with the verbose flag. For obsoletes we could always show the "replacing" line, which is similar to what dnf does today.
That said, I do like the idea of always seeing both old and new versions in the output, but that is the only field I feel that way about. Perhaps we could change the output to be something like this:
Package Arch Old Version New Version Repository Size
Upgrading:
filesystem x86_64 3.18-3.fc38 3.18-4.fc39 rawhide 106.0 B
This will show the most important changing information (the version) while leaving out the information that is usually the same. What do you think?