Bug 2125499

Summary: sos yum dnf cleanup
Product: Red Hat Enterprise Linux 9 Reporter: Pavel Moravec <pmoravec>
Component: sosAssignee: Pavel Moravec <pmoravec>
Status: CLOSED CURRENTRELEASE QA Contact: Miroslav Hradílek <mhradile>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.1CC: agk, bmr, mhradile, plambri, sbradley, theute
Target Milestone: rcKeywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: sos-4.4-2.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-03-16 21:42:30 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:

Description Pavel Moravec 2022-09-09 08:01:03 UTC
This bug was initially created as a copy of Bug #2100154

I am copying this bug because: 

we need to have 8.8 and 9.2 in par


Sos report treats yum and dnf as separate commands, collecting 2 sets of information. Some of this is duplicates, while others don't know the 2 directories exist.

* sos_commands/yum should be a link to sos_commands/dnf

  This will put all the commands in one directory so engineers won't forget to look in both locations.

   # ls -l /usr/bin/yum
     lrwxrwxrwx. 1 root root 5 Mar 18 11:21 /usr/bin/yum -> dnf-3

* Instead of grabbing a specific package with: "dnf_--assumeno_list_installed_dnf", lets grab "dnf list --installed" and get a full listing of the installed packages. 

* remove "--assumeno" from all the commands. It's really not necessary as there is no "y/n" prompt from any of these commands:

=======================================
Old List of commands
=======================================
# cd sos_commands
# tree dnf yum/
dnf
├── dnf_--assumeno_list_extras
├── dnf_--assumeno_list_installed_dnf
├── dnf_--assumeno_module_list
├── dnf_--assumeno_module_list_--installed
├── dnf_--version
├── package-cleanup_--dupes
└── package-cleanup_--problems
yum/
├── package-cleanup_--dupes
├── package-cleanup_--problems
├── yum_-C_repolist
├── yum_-C_repolist_--verbose
├── yum_history
└── yum_list_installed

=======================================
New Requested List
=======================================
# for i in $(ls sos_commands/dnf/); do ln -s ../dnf/$i sos_commands/yum/$(echo $i |sed 's/dnf/yum/g');done
# tree
.
├── dnf
│   ├── dnf_-C_repolist
│   ├── dnf_-C_repolist_--verbose
│   ├── dnf_history
│   ├── dnf_list_extras
│   ├── dnf_list_installed
│   ├── dnf_module_list
│   ├── dnf_module_list_--installed
│   ├── dnf_--version
│   ├── package-cleanup_--dupes
│   └── package-cleanup_--problems
└── yum
    ├── package-cleanup_--dupes -> ../dnf/package-cleanup_--dupes
    ├── package-cleanup_--problems -> ../dnf/package-cleanup_--problems
    ├── yum_-C_repolist -> ../dnf/dnf_-C_repolist
    ├── yum_-C_repolist_--verbose -> ../dnf/dnf_-C_repolist_--verbose
    ├── yum_history -> ../dnf/dnf_history
    ├── yum_list_extras -> ../dnf/dnf_list_extras
    ├── yum_list_installed -> ../dnf/dnf_list_installed
    ├── yum_module_list -> ../dnf/dnf_module_list
    ├── yum_module_list_--installed -> ../dnf/dnf_module_list_--installed
    └── yum_--version -> ../dnf/dnf_--version

- - - - - - - - - OR - - - - - - - - - 
# for i in $(ls dnf*); do ln -s $i sos_commands/dnf/$(echo $i |sed 's/dnf/yum/g');done
# tree
.
├── dnf
│   ├── dnf_-C_repolist
│   ├── dnf_-C_repolist_--verbose
│   ├── dnf_history
│   ├── dnf_list_extras
│   ├── dnf_list_installed
│   ├── dnf_module_list
│   ├── dnf_module_list_--installed
│   ├── dnf_--version
│   ├── package-cleanup_--dupes
│   ├── package-cleanup_--problems
│   ├── yum_-C_repolist -> dnf_-C_repolist
│   ├── yum_-C_repolist_--verbose -> dnf_-C_repolist_--verbose
│   ├── yum_history -> dnf_history
│   ├── yum_list_extras -> dnf_list_extras
│   ├── yum_list_installed -> dnf_list_installed
│   ├── yum_module_list -> dnf_module_list
│   ├── yum_module_list_--installed -> dnf_module_list_--installed
│   └── yum_--version -> dnf_--version
└── yum -> dnf

- - - - - - - - - OR - - - - - - - - - 
# ln -s dnf sos_commands/yum
# tree
.
├── dnf
│   ├── dnf_-C_repolist
│   ├── dnf_-C_repolist_--verbose
│   ├── dnf_history
│   ├── dnf_list_extras
│   ├── dnf_list_installed
│   ├── dnf_module_list
│   ├── dnf_module_list_--installed
│   ├── dnf_--version
│   ├── package-cleanup_--dupes
│   ├── package-cleanup_--problems
└── yum -> dnf

Comment 7 Pavel Moravec 2023-03-16 21:42:30 UTC
Closing the bugzilla as the fix has been delivered in sos-4.5.0-1.el9 released via https://access.redhat.com/errata/RHBA-2023:1301 errata.