Bug 220286

Summary: Feature request: checkisomd5 "gauge" progress percentage lines
Product: [Fedora] Fedora Reporter: Ryan Finnie <ryan>
Component: anacondaAssignee: David Cantrell <dcantrell>
Status: CLOSED RAWHIDE QA Contact:
Severity: low Docs Contact:
Priority: medium    
Version: rawhide   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-01-05 20:19:08 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Patch to add "gauge" support to checkisomd5 none

Description Ryan Finnie 2006-12-20 06:50:20 UTC
The attached patch adds a --gauge option to isomd5sum/checkisomd5, suitable for
piping to a program such as dialog(1).  "checkisomd5 --gauge" outputs a series
of lines corresponding to the percentage checked:

$ ./checkisomd5 --gauge /tmp/testiso.iso
0
1
2
3
4
5
6
[...]
94
95
96
97
98
99
100
$

Piping to dialog(1) produces a pretty status gauge:

$ ./checkisomd5 --gauge /tmp/testiso.iso | dialog --gauge 'Please wait, checking
disc...' 0 70

This patch changes the "quiet" argument in
checkmd5sum/doMediaCheck/mediaCheckFile into a "flags" argument, with the first
bit representing "quiet" and the second representing "gauge".  The resulting
functionality is backwards compatible with older invocations; eg
"mediaCheckFile(argv[filearg], !verbose)" would still work.  Because of this,
pyisomd5sum.c remains unchanged, and "checkisomd5 /tmp/testiso.iso" will still
produce no output on success.

Comment 1 Ryan Finnie 2006-12-20 06:50:20 UTC
Created attachment 144075 [details]
Patch to add "gauge" support to checkisomd5

Comment 2 David Cantrell 2007-01-05 20:19:08 UTC
Seems sane to me.  Added this to anaconda HEAD CVS.

Thanks.