When downloading/importing packages, enforce all checksums

This commit is contained in:
Andrey Smirnov
2017-04-15 01:33:08 +03:00
parent c40025a335
commit 1f3cb2db5d
12 changed files with 57 additions and 16 deletions
+4 -1
View File
@@ -542,7 +542,6 @@ func (repo *RemoteRepo) BuildDownloadQueue(packagePool aptly.PackagePool, skipEx
// FinalizeDownload swaps for final value of package refs
func (repo *RemoteRepo) FinalizeDownload(collectionFactory *CollectionFactory, progress aptly.Progress) error {
repo.LastDownloadDate = time.Now()
repo.packageRefs = NewPackageRefListFromPackageList(repo.packageList)
if progress != nil {
progress.InitBar(int64(repo.packageList.Len()), true)
@@ -556,9 +555,13 @@ func (repo *RemoteRepo) FinalizeDownload(collectionFactory *CollectionFactory, p
if progress != nil {
progress.SetBar(i)
}
// download process might have udpated checksums
p.UpdateFiles(p.Files())
return collectionFactory.PackageCollection().Update(p)
})
repo.packageRefs = NewPackageRefListFromPackageList(repo.packageList)
if progress != nil {
progress.ShutdownBar()
}