diff options
author | Michael Vogt <mvo@ubuntu.com> | 2014-04-16 17:41:11 +0200 |
---|---|---|
committer | Michael Vogt <mvo@ubuntu.com> | 2014-04-16 17:41:11 +0200 |
commit | 96c6cab1fd5a5de19fbd552b42e1dd1c08417946 (patch) | |
tree | af57b603454e42d784aa3ace7253151e8d805818 /apt-private | |
parent | b11f95991d844d36fc0e3832810057f72a2d810b (diff) |
calculate Percent as part of pkgAcquireStatus to provide a weighted percent for both items and bytes
Diffstat (limited to 'apt-private')
-rw-r--r-- | apt-private/acqprogress.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apt-private/acqprogress.cc b/apt-private/acqprogress.cc index fe7a45e12..adec37405 100644 --- a/apt-private/acqprogress.cc +++ b/apt-private/acqprogress.cc @@ -170,7 +170,7 @@ bool AcqTextStatus::Pulse(pkgAcquire *Owner) ScreenWidth = sizeof(Buffer)-1; // Put in the percent done - sprintf(S,"%.0f%%",((CurrentBytes + CurrentItems)*100.0)/(TotalBytes+TotalItems)); + sprintf(S,"%.0f%%", Percent); bool Shown = false; for (pkgAcquire::Worker *I = Owner->WorkersBegin(); I != 0; |