Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

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: ---Flags: pm-rhel: mirror+
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.