Bug 1962963

Summary: dnf list --installed displays all installed packages in red after first dnf upgrade
Product: Red Hat Enterprise Linux 8 Reporter: gary.leydon
Component: dnfAssignee: amatej
Status: CLOSED ERRATA QA Contact: Jan Blazek <jblazek>
Severity: low Docs Contact:
Priority: low    
Version: 8.4CC: amatej, gary.leydon, james.antill, mblaha, pkratoch
Target Milestone: betaKeywords: Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: dnf-4.7.0-5.el8 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-05-10 15:23:43 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:
Attachments:
Description Flags
example output from dnf list installed none

Description gary.leydon 2021-05-20 21:46:19 UTC
Created attachment 1785361 [details]
example output from dnf list installed

Description of problem:
After initial install of RHEL 8.4 on EC2 instance using RHEL official AMI ami-098bb5d92c8886ca1. 
sudo to root
#dnf list installed. //the list of installed packages is displayed in black
#dnf upgrade
 ..... normal upgrade proceeds
#dnf list installed //the entire list of packages is listed in red. 

Version-Release number of selected component (if applicable):
dnf version 4.4.2

How reproducible:
I've built 2 EC2 instances from the same AMI which installs 8.4 according to /etc/system-release


Steps to Reproduce:
1. Spin up EC2 using Red Hat Enterprise 8.0 AMI ami-098bb5d92c8886ca1
2. ssh in to ec2-user@xxxx
3. sudo -s
4. dnf list installed (all packages shows up in black)
5. dnf upgrade
6. dnf list installed (all packages show up in red)

Actual results:
See above

Expected results:
I would expect them to be listed in black. Also there is no documentation (that I can find) in man dnf, man 5 dnf.conf, man yum, man 5 yum.conf that explains exactly what red means. 

Additional info:
If I first just select 1 package (e.g. dnf upgrade bash ) then do dnf list installed the bash package is displayed normally (in black). It is only after doing dnf upgrade which installed ~ 22 packages and upgraded the rest that dnf list installed always displays the package names in red. It would be nice to have the color scheme defined somewhere. Also if listing them in red is not a warning or alert, either no color, or something like green or blue would be a better color choice IMHO.

Comment 1 gary.leydon 2021-05-21 16:43:52 UTC
It looks like this is a difference between dnf v 4.09 and dnf v 4.42.
On a brand new installation dnf is v4.09 and dnf list installed shows all in black
# dnf upgrade dnf

#dnf --version 4.42
#dnf list installed shows all packages in red.

I don't know if this is a bug or a feature.

Comment 2 gary.leydon 2021-05-21 17:55:18 UTC
Ok so this is not a bug but a feature. If I might suggest, please put the default colors in the man pages for man 5 dnf.conf

e.g. rather than
color_list_installed_extra
   color
   Color of available.....

this would be much more helpful
color_list_installed_extra
   color (default bold,red)
   Color of available .....

Comment 3 amatej 2021-05-24 11:20:14 UTC
Associated PR: https://github.com/rpm-software-management/dnf/pull/1770

Comment 11 errata-xmlrpc 2022-05-10 15:23:43 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (dnf bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:2051