Bug 1786339

Summary: yum history command output is trimmed because of hardcoded 79 cols limit
Product: Red Hat Enterprise Linux 7 Reporter: Ivan Pesin <ivan.pesin>
Component: yumAssignee: Jaroslav Mracek <jmracek>
Status: CLOSED NEXTRELEASE QA Contact: swm-qe
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.8CC: james.antill, john.kk.wong, sgolovat
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-01-06 14:01:26 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 Ivan Pesin 2019-12-24 14:27:23 UTC
Description of problem:

`yum --setopt=history_list_view=commands history` command's output is limited to 79 columns regardless of the actual terminal width. This often results in the commands column being trimmed, and makes it impossible to see the complete history information.

How reproducible:

Execute yum install/update/remove command with parameters string longer than 24 characters. For example:

   yum -y install vim-enhanced tree patch mc bind-utils

Actual results:

# yum --setopt=history_list_view=commands history
Loaded plugins: copr, fastestmirror
ID     | Command line             | Date and time    | Action(s)      | Altered
-------------------------------------------------------------------------------
    12 | -y install vim-enhanced  | 2019-12-24 14:22 | Install        |   35
    11 | update                   | 2019-12-24 11:27 | I, U           |  178 EE
    10 | -y install monit         | 2019-03-10 00:42 | Install        |    1
     9 | -y install tree          | 2019-01-27 23:30 | Install        |    1
     8 | update                   | 2019-01-27 23:04 | Update         |    5
     7 | -y install lvm2          | 2019-01-10 00:10 | Install        |    6
     6 | install snapd            | 2019-01-09 23:59 | Install        |   17
     5 | -y install epel-release  | 2019-01-09 23:59 | Install        |    1
     4 | update                   | 2019-01-09 23:54 | I, O, U        |  158 EE
     3 | install yum-plugin-copr  | 2019-01-09 23:53 | Install        |    8
     2 | install NetworkManager-t | 2019-01-09 23:43 | Update         |    6
     1 |                          | 2018-08-30 03:19 | Install        |  294
history list

Expected results:

# yum --setopt=history_list_view=commands history
Loaded plugins: copr, fastestmirror
ID     | Command line                                                  | Date and time    | Action(s)      | Altered
--------------------------------------------------------------------------------------------------------------------
    12 | -y install vim-enhanced tree patch mc bind-utils              | 2019-12-24 14:22 | Install        |   35
    11 | update                                                        | 2019-12-24 11:27 | I, U           |  178 EE
    10 | -y install monit                                              | 2019-03-10 00:42 | Install        |    1
     9 | -y install tree                                               | 2019-01-27 23:30 | Install        |    1
     8 | update                                                        | 2019-01-27 23:04 | Update         |    5
     7 | -y install lvm2                                               | 2019-01-10 00:10 | Install        |    6
     6 | install snapd                                                 | 2019-01-09 23:59 | Install        |   17
     5 | -y install epel-release                                       | 2019-01-09 23:59 | Install        |    1
     4 | update                                                        | 2019-01-09 23:54 | I, O, U        |  158 EE
     3 | install yum-plugin-copr                                       | 2019-01-09 23:53 | Install        |    8
     2 | install NetworkManager-tui                                    | 2019-01-09 23:43 | Update         |    6
     1 |                                                               | 2018-08-30 03:19 | Install        |  294
history list

Comment 2 Jaroslav Mracek 2020-01-06 14:01:26 UTC
Thank for the report and the patch.

Due to late state of RHEL 7 life cycle we cannot backport supposed change, but the issue will be resolved in RHEL8.

Comment 4 john.kk.wong 2023-08-08 07:21:36 UTC
May I know where is the patch?  or any workaround? thank you.

Comment 5 Sergii Golovatiuk 2023-08-09 10:09:25 UTC
Patch is in https://bugzilla.redhat.com/show_bug.cgi?id=1786316