Bug 474822 - progress bar not redrawn correctly on narrow terminals
progress bar not redrawn correctly on narrow terminals
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: yum (Show other bugs)
5.3
All Linux
low Severity low
: ---
: ---
Assigned To: James Antill
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-12-05 09:35 EST by David Kovalsky
Modified: 2014-03-31 19:44 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Previously, yum assumed that any terminal was 80 characters in width. Therefore, when it drew a progress bar on the screen, each additional # printed would force a new line on terminals narrower than 80 characters. Yum now determines the actual width of the terminal rather than assuming the width, and draws its progress bars accordingly.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-09-02 03:34:02 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
yum output to terminal (2.39 KB, text/plain)
2008-12-05 09:35 EST, David Kovalsky
no flags Details

  None (edit)
Description David Kovalsky 2008-12-05 09:35:14 EST
Created attachment 325848 [details]
yum output to terminal

When running yum install on a narrow terminal (mine was 69 chars, but anything narrow will work), the progress is not redrawn, but a newline printed. 

So it looks something like this:

Running Transaction
  Installing     : httpd-manual 
  Installing     : httpd-manual                 #
  Installing     : httpd-manual                 ##
  Installing     : httpd-manual                 ###                  
  Installing     : httpd-manual                 #### 
...

100% reproducer:

 - start konsole (i386,F8, kdebase-3.5.10-2.fc8)
 - ssh root@server
 - resize konsole so that it's aproximate 3/4 in width, 
   about 60 chars wide
 - yum install httpd-manual

server instalation:
 - x86_64 RHEL 5.3 from latest trees 
 - yum-3.2.19-18.el5
 - rpm-4.4.2.3-8.el5

A can image a couple of options how this could be fixed:
 - scale the progress bar
 - don't print the progress bar if the terminal is too narrow
 - bail out if the terminal is too narrow (like 'w' does, but this is
   probably the worst option, probably much worse than incorrectly 
   printing the progress)
   [root@kovy ~]# w
   67 column window is too narrow
Comment 1 James Antill 2008-12-05 09:54:13 EST
Yeh, this only got fixed very recently upstream ... before that it just assumed ~80 chars width.
If we do another rebase for 5.4 this will come along for the ride, but I'm not sure if we are (and back porting it is non-trivial, and probably worthless). So no devel ACK, yet.
Comment 6 Ruediger Landmann 2009-09-01 08:26:13 EDT
Release note added. If any revisions are required, please set the 
"requires_release_notes" flag to "?" and edit the "Release Notes" field accordingly.
All revisions will be proofread by the Engineering Content Services team.

New Contents:
Previously, yum assumed that any terminal was 80 characters in width. Therefore, when it drew a progress bar on the screen, each additional # printed would force a new line on terminals narrower than 80 characters. Yum now determines the actual width of the terminal rather than assuming the width, and draws its progress bars accordingly.
Comment 7 errata-xmlrpc 2009-09-02 03:34:02 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-1419.html

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