After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 709276 - Percentage indicator for subcommands
Percentage indicator for subcommands
Status: RESOLVED FIXED
Product: gparted
Classification: Other
Component: application
0.12.1
Other Linux
: Normal enhancement
: ---
Assigned To: gparted maintainers alias
gparted maintainers alias
Depends on:
Blocks:
 
 
Reported: 2013-10-02 15:45 UTC by sworddragon2
Modified: 2014-01-19 08:29 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
resize2fs text progress bars (v1) (4.96 KB, patch)
2013-10-03 16:02 UTC, Mike Fleetwood
none Details | Review
Test program generating text progress bars in various ways (5.07 KB, text/plain)
2013-10-03 16:03 UTC, Mike Fleetwood
  Details

Description sworddragon2 2013-10-02 15:45:27 UTC
Commands like resize2fs can need a lot of time until they will finish. In this case it would be good if GParted would show besides the executed comamnd how far it is (if not already implemented in the newest version). For example resize2fs provides for this the option -p. Maybe some other commands are providing such an option too which could be used by GParted.
Comment 1 Curtis Gedak 2013-10-02 16:28:17 UTC
Thank you for your interest in improving GParted.

Improved tracking of command progress by using asynchronous execution was introduced with Bug #685740 - Refactor to use asynchronous command execution.

Further reporting of command progress was added with Bug #697662 - Do not hide the progress of the tools used.

This request is a duplicate of Bug #467925 - gparted: add progress bar during operation.  Please review bug #467925 and place future comments there.

*** This bug has been marked as a duplicate of bug 467925 ***
Comment 2 Mike Fleetwood 2013-10-03 16:02:38 UTC
Created attachment 256397 [details] [review]
resize2fs text progress bars (v1)

Hi Curtis,

I realised that it wouldn't take much to correctly display the progress
bars from resize2fs, so here's the patches.

  Enhance line discipline in PipeCapture::OnReadable() (#709276)
  Turn on resize2fs text progress bars (#709276)

I wrote a test program, progressbars.py, which uses backspace and
carriage return to display text progress bars in various ways.  Run it
from the command like first.  Then temporarily renamed it to
/sbin/fsck.hfsplus to test GParted with it.  I also tested resizing ntfs
and checking ext2 to confirm output / progress bars are displayed
correctly for existing commands as well resize2fs.

Thanks,
Mike
Comment 3 Mike Fleetwood 2013-10-03 16:03:48 UTC
Created attachment 256399 [details]
Test program generating text progress bars in various ways
Comment 4 Curtis Gedak 2013-10-03 17:15:54 UTC
Thank you Mike for looking again at progress indication for resize2fs, and for developing a patch and providing a test program.

I successfully tested this patch with ext2 and ntfs partitions for growing and checking.  Also successfully tested with hfsplus and the test program from comment #3.  In addition saved the details file from GParted 0.16.2 and compared the output to the same operation using this patch and all discrepancies could be easily accounted for (e.g., more or less time to execute a command).

Hence I have committed the patch set from comment #2 to the git repository for inclusion in the next release of GParted.

The relevant git commits can be viewed at the following links:

Enhance line discipline in PipeCapture::OnReadable() (#709276)
https://git.gnome.org/browse/gparted/commit/?id=1b54123580aa668d3a2c391cce2d60c65a1668f9

Turn on resize2fs text progress bar (#709276)
https://git.gnome.org/browse/gparted/commit/?id=21e166c949bc89b55a6f427c820cd9f92edd3dfa
Comment 5 Curtis Gedak 2013-10-03 17:17:21 UTC
Removed the "duplicate" status of this report because an enhancement has been added to add a progress bar the details section for resize2fs.
Comment 6 Curtis Gedak 2013-12-09 18:06:45 UTC
This enhancement was included in the GParted 0.17.0 release on December 9, 2013.