diff --git a/debian/remote.go b/debian/remote.go index 0ac1fc2c..c7e82acc 100644 --- a/debian/remote.go +++ b/debian/remote.go @@ -211,7 +211,7 @@ func (repo *RemoteRepo) Download(d utils.Downloader, packageCollection *PackageC _, found := queued[key] if !found { count++ - downloadSize += task.Size + downloadSize += task.Checksums.Size queued[key] = task } } @@ -229,7 +229,7 @@ func (repo *RemoteRepo) Download(d utils.Downloader, packageCollection *PackageC ch := make(chan error, len(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 diff --git a/debian/remote_test.go b/debian/remote_test.go index d1f999e7..50d25556 100644 --- a/debian/remote_test.go +++ b/debian/remote_test.go @@ -419,7 +419,7 @@ Section: utils Priority: optional Filename: pool/main/a/amanda/amanda-client_3.3.1-3~bpo60+1_amd64.deb Size: 3 -MD5sum: cdc997dc06126e18ea9ba843efed9811 -SHA1: 049ba341d520c447fa2e6a1f8c871b3dbbe00106 -SHA256: 4487115ca47fe9acd95355b9278f30e18c53f33c385252252d3d7948d650d1d0 +MD5sum: d16fb36f0911f878998c136191af705e +SHA1: 66b27417d37e024c46526c2f6d358a754fc552f3 +SHA256: 3608bca1e44ea6c4d268eb6db02260269892c0b42b86bbf1e77a6fa16c3c9282 `