Subject: bin/33207: progress(1) w/ stdin: useless progress bar
To: None <gnats-admin@netbsd.org, netbsd-bugs@netbsd.org>
From: None <hubertf@NetBSD.org>
List: netbsd-bugs
Date: 04/06/2006 09:30:00
>Number:         33207
>Category:       bin
>Synopsis:       progress(1) w/ stdin: useless progress bar
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    bin-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Thu Apr 06 09:30:00 +0000 2006
>Originator:     NetBSD 3.0 sendmail sucks
>Release:        3.0, -current (3.99.x)
>Organization:
>Environment:
NetBSD-current (3.99.x) progress(1)
>Description:
[writing this via the web form, as my sendmail setup is busted after an update to NetBSD 3.0 :-/]

        In NetBSD-current, when reading data from stdin on
        progress(1) a progress bar showing 100% is printed
        all the time as of recently. As no real size can't
        be determined, no progress bar should be displayed.

        This was the case up until recently, and it should be
        changed back.

Old, proper behaviour:

        miyu% cat /etc/passwd | /usr/bin/progress dd of=/dev/null
             0       0.00 KB/s 2+1 records in
        2+1 records out
        1362 bytes transferred in 0.011 secs (123818 bytes/sec)
          1362      80.62 KB/s 

New, bad behaviour:

        miyu% cat /etc/passwd | obj.i386//progress dd of=/dev/null
          0% |                                     |     0       0.00 KB/s    --:-- ETA2+1 records in
        2+1 records out
        1362 bytes transferred in 0.001 secs (1362000 bytes/sec)
        100% |*************************************|  1362     219.37 KB/s    00:00 ETA


>How-To-Repeat:
See above.
>Fix:
        I suspect this was changed when the -e option to print to
        stdout was added. The chance that affects printing the progress
        bar should be made undone. (printing to stdout is fine).