Bug 1662809 - "dnf list" output's section headers hide among the list output
Summary: "dnf list" output's section headers hide among the list output
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 29
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: 2019-01-02 04:07 UTC by "FeRD" (Frank Dana)
Modified: 2019-05-11 19:28 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-05-11 19:28:59 UTC
Type: Bug


Attachments (Terms of Use)

Description "FeRD" (Frank Dana) 2019-01-02 04:07:10 UTC
Description of problem:
If I type `dnf list <some-matchspec>`, the output is displayed in two sections: "Installed Packages", followed by "Available Packages". However, because those section headers are simply printed atop each list of packages, they are easily overlooked when reading the output. It's tempting to suggest that the headers can be spotted by scanning for short output lines which don't contain EVR or source columns, but due to wrapping many individual package items can also produce short lines in the output, so in practice that's not an effective method of finding header lines.

Version-Release number of selected component (if applicable):
dnf-4.0.9-2.fc29.noarch

As an example, on my F29 system with rpmfusion repos enabled, in an 80-column terminal window, running `dnf list nvidia\*` (only chosen because I know that the relatively-short list contains wrapped package lines which clearly illustrate the issue) produces the following output:

$ sudo dnf list nvidia\*     
Last metadata expiration check: 1:07:54 ago on Tue 01 Jan 2019 09:33:40 PM EST.
Installed Packages
nvidia-persistenced.x86_64            3:415.25-1.fc29 @rpmfusion-nonfree-updates
nvidia-query-resource-opengl.x86_64   1.0.0-4.fc29    @fedora                   
nvidia-query-resource-opengl-lib.x86_64
                                      1.0.0-4.fc29    @fedora                   
nvidia-settings.x86_64                3:415.25-1.fc29 @rpmfusion-nonfree-updates
nvidia-texture-tools.x86_64           2.0.8-19.fc29   @fedora                   
Available Packages
nvidia-modprobe.x86_64                3:415.25-1.fc29 rpmfusion-nonfree-updates 
nvidia-settings-390xx.x86_64          390.87-1.fc29   rpmfusion-nonfree         
nvidia-texture-tools.i686             2.0.8-19.fc29   fedora                    
nvidia-texture-tools-devel.i686       2.0.8-19.fc29   fedora                    
nvidia-texture-tools-devel.x86_64     2.0.8-19.fc29   fedora                    
nvidia-xconfig.x86_64                 3:415.25-1.fc29 rpmfusion-nonfree-updates 

"Available Packages", in particular, is nearly invisible, nestled there among the package names.

Compare to the similar command `dnf module list`, which groups its output into sections by repo. In that output, each header (repo name) is printed in bold, and a blank line is inserted between the end of each repo's list and the (bold) repo-name header that begins the next list:

$ sudo dnf module list container-tools  
Last metadata expiration check: 1:32:09 ago on Tue 01 Jan 2019 09:33:40 PM EST.
Fedora Modular 29 - x86_64
Name            Stream Profiles Summary                                         
container-tools 2017.0 default  Common tools and dependencies for container runt
                                imes
container-tools 2018.0 default  Common tools and dependencies for container runt
                                imes

Fedora Modular 29 - x86_64 - Updates
Name            Stream Profiles Summary                                         
container-tools 2017.0 default  Common tools and dependencies for container runt
                                imes
container-tools 2018.0 default  Common tools and dependencies for container runt
                                imes

Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled


(Both "Fedora Modular 29 - x86_64" and "Fedora Modular 29 - x86_64 - Updates" would be displayed in bold.)

Adopting one or both (preferably both) of those formatting adjustments in the `dnf list` output would greatly increase readability.

Comment 1 Jaroslav Mracek 2019-05-11 19:28:59 UTC
I compared output from "dnf list" with "yum-deprecated list". There is no difference in separation of installed, available sections. At the present time we cannot introduce any changes that results in incompatibility between yum and dnf. I am sorry, but we cannot change the output.


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