From 1dca8dc55c1fcf4bda07a7e8285de7f225448697 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 16 Apr 2014 15:28:23 +0200 Subject: load the size from the metaindex into the fetcher to have even more accurate progress information --- apt-pkg/acquire.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'apt-pkg/acquire.cc') diff --git a/apt-pkg/acquire.cc b/apt-pkg/acquire.cc index 2b427ccd3..9fc40752f 100644 --- a/apt-pkg/acquire.cc +++ b/apt-pkg/acquire.cc @@ -905,8 +905,11 @@ bool pkgAcquireStatus::Pulse(pkgAcquire *Owner) // calculate the percentage, if we have too little data assume 0% + // FIXME: the 5k is totally arbitrary + // FIXME2: instead, use a algorithm where 50% is based on total bytes + // and the other 50% on total files int Percent; - if (TotalBytes < 1*1024) + if (TotalBytes < 5*1024) Percent = 0; else Percent = (CurrentBytes/float(TotalBytes)*100.0); -- cgit v1.2.3