Bug 220286 - Feature request: checkisomd5 "gauge" progress percentage lines
Summary: Feature request: checkisomd5 "gauge" progress percentage lines
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: anaconda
Version: rawhide
Hardware: All
OS: Linux
medium
low
Target Milestone: ---
Assignee: David Cantrell
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-12-20 06:50 UTC by Ryan Finnie
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-01-05 20:19:08 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Patch to add "gauge" support to checkisomd5 (3.80 KB, patch)
2006-12-20 06:50 UTC, Ryan Finnie
no flags Details | Diff

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.


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