When downloading/importing packages, enforce all checksums

This commit is contained in:
Andrey Smirnov committed 2017-04-26 23:17:04 +03:00
1 parent c40025a335
commit 1f3cb2db5d
12 files changed
+57 -16

No files matched your search

+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()
}