diff options
author | Michael Vogt <mvo@ubuntu.com> | 2014-04-16 15:28:23 +0200 |
---|---|---|
committer | Michael Vogt <mvo@ubuntu.com> | 2014-04-16 15:28:23 +0200 |
commit | 1dca8dc55c1fcf4bda07a7e8285de7f225448697 (patch) | |
tree | 25366e329ee89765bbe92c0fb45f6c301ef6375d /apt-pkg/acquire.cc | |
parent | d0cfa8adbdd74ad7e363019739c77e713dc982e5 (diff) |
load the size from the metaindex into the fetcher to have even more accurate progress information
Diffstat (limited to 'apt-pkg/acquire.cc')
-rw-r--r-- | apt-pkg/acquire.cc | 5 |
1 files changed, 4 insertions, 1 deletions
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); |