From fb193b1cd43f0e8c3b7e5f69f183b9abe7e83761 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 15 Mar 2016 14:50:37 +0100 Subject: Get accurate progress reporting in apt update again For the non-pdiff case, we have can have accurate progress reporting because after fetching the {,In}Release files we know how many IndexFiles will be fetched and what size they have. Therefore init the filesize early (in pkgAcqIndex::Init) and ensure that in Acquire::Pulse() looks at already downloaded bits when calculating the progress in Acquire::Pulse. Also improve debug output of Debug::acquire::progress --- test/integration/test-apt-update-not-modified | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'test/integration/test-apt-update-not-modified') diff --git a/test/integration/test-apt-update-not-modified b/test/integration/test-apt-update-not-modified index 82e69d5d5..ce3bc0dd3 100755 --- a/test/integration/test-apt-update-not-modified +++ b/test/integration/test-apt-update-not-modified @@ -34,6 +34,7 @@ Reading package lists..." aptget update # readd arch so its downloaded again… configarchitecture 'amd64' 'i386' # … but oh noes, hashsum mismatch! + SIZE=$(stat -c '%s' 'aptarchive/dists/unstable/main/binary-amd64/Packages.gz') find aptarchive/dists/unstable/main/binary-amd64/ -type f -delete cat >> aptarchive/dists/unstable/main/binary-amd64/Packages <> aptarchive/dists/unstable/main/binary-amd64/Packages <