From 96c6cab1fd5a5de19fbd552b42e1dd1c08417946 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 16 Apr 2014 17:41:11 +0200 Subject: calculate Percent as part of pkgAcquireStatus to provide a weighted percent for both items and bytes --- apt-private/acqprogress.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apt-private') 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; -- cgit v1.2.3