diff options
author | David Kalnischkies <david@kalnischkies.de> | 2016-08-15 10:39:53 +0200 |
---|---|---|
committer | Julian Andres Klode <jak@debian.org> | 2016-10-05 21:53:38 +0200 |
commit | 65979c215df7a4fe1585fd988e4e5a06bc5d306b (patch) | |
tree | 7518c3fe27e3eff4381bee25a18fa80ebbbc649a | |
parent | db19384200aa61930aa182e6b28f1635d4b69504 (diff) |
set the correct item FileSize in by-hash case
In af81ab9030229b4ce6cbe28f0f0831d4896fda01 we implement by-hash as a
special compression type, which breaks this filesize setting as the code
is looking for a foobar.by-hash file then. Dealing this slightly gets
us the intended value. Note that this has no direct effect as this value
will be set in other ways, too, and could only effect progress reporting.
Gbp-Dch: Ignore
(cherry picked from commit 3084ef2292642d43e533654354a4929abe55d91b)
-rw-r--r-- | apt-pkg/acquire-item.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index 353ac942f..03b80be84 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -2644,10 +2644,6 @@ void pkgAcqIndex::Init(string const &URI, string const &URIDesc, DestFile = GetPartialFileNameFromURI(URI); NextCompressionExtension(CurrentCompressionExtension, CompressionExtensions, false); - // store file size of the download to ensure the fetcher gives - // accurate progress reporting - FileSize = GetExpectedHashes().FileSize(); - if (CurrentCompressionExtension == "uncompressed") { Desc.URI = URI; @@ -2684,6 +2680,9 @@ void pkgAcqIndex::Init(string const &URI, string const &URIDesc, DestFile = DestFile + '.' + CurrentCompressionExtension; } + // store file size of the download to ensure the fetcher gives + // accurate progress reporting + FileSize = GetExpectedHashes().FileSize(); Desc.Description = URIDesc; Desc.Owner = this; |