Draft: Progress redesign

This implements a less smooth, stepped progress interface, common for downloads and installs:

Download progress

The download progress starts partially indeterminate, when we can't define an ETA and download speed we display just percentage.

 5% Downloading... ∎∎∎∎∎—————————————————————————————————————————————————————————————————————————————————————————————————————————— 

Once we have more data, we replace this with a more featured download bar with speed and ETA.

34% Downloading (28.4 MB/s)... ∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎——————————————————————————————————————————————————————————————— 00:29

Finally we print the number of bytes downloaded and the speed. Note "Fetched" becomes "Downloaded". It starts with a green checkmark.

✓ Downloaded 1057 MB in 26s (40.0 MB/s)                                                                                            

Install progress

The install progress says "Performing changes..." as the operation progress and prints percent and the time passed so far, rather than an ETA.

Example:

99% Performing changes... ∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎— (00:28)
✓ Performed changes.

This will become especially useful with Dpkg::Attach set to false, when dpkg output is not shown on the terminal but rendered directly to the log file (if any).

Further work

  • We want to find out if items are downloading unusually slow, and if so, render a tree of items below the total progress
  • Detached dpkg needs support for conffile handling as well as debconf prompting
  • OpProgress has not been redesigned, it generally is not long running and does not benefit from progress bars.
Edited by Julian Andres Klode

Merge request reports

Loading