Pass expected checksums for package files to downloader.

This commit is contained in:
Andrey Smirnov
2014-02-03 17:42:12 +04:00
parent 360e09cc7d
commit c1feb4210c
2 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -211,7 +211,7 @@ func (repo *RemoteRepo) Download(d utils.Downloader, packageCollection *PackageC
_, found := queued[key] _, found := queued[key]
if !found { if !found {
count++ count++
downloadSize += task.Size downloadSize += task.Checksums.Size
queued[key] = task queued[key] = task
} }
} }
@@ -229,7 +229,7 @@ func (repo *RemoteRepo) Download(d utils.Downloader, packageCollection *PackageC
ch := make(chan error, len(queued)) ch := make(chan error, len(queued))
for _, task := range queued { for _, task := range queued {
d.Download(repo.PackageURL(task.RepoURI).String(), task.DestinationPath, ch) d.DownloadWithChecksum(repo.PackageURL(task.RepoURI).String(), task.DestinationPath, ch, task.Checksums)
} }
// Wait for all downloads to finish // Wait for all downloads to finish
+3 -3
View File
@@ -419,7 +419,7 @@ Section: utils
Priority: optional Priority: optional
Filename: pool/main/a/amanda/amanda-client_3.3.1-3~bpo60+1_amd64.deb Filename: pool/main/a/amanda/amanda-client_3.3.1-3~bpo60+1_amd64.deb
Size: 3 Size: 3
MD5sum: cdc997dc06126e18ea9ba843efed9811 MD5sum: d16fb36f0911f878998c136191af705e
SHA1: 049ba341d520c447fa2e6a1f8c871b3dbbe00106 SHA1: 66b27417d37e024c46526c2f6d358a754fc552f3
SHA256: 4487115ca47fe9acd95355b9278f30e18c53f33c385252252d3d7948d650d1d0 SHA256: 3608bca1e44ea6c4d268eb6db02260269892c0b42b86bbf1e77a6fa16c3c9282
` `