mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-06 22:18:28 +00:00
Don't download the same files twice in one cycle.
This commit is contained in:
Vendored
+14
@@ -293,6 +293,20 @@ func (p *Package) DownloadList(packageRepo *Repository) (result [][]string, err
|
||||
return result, nil
|
||||
}
|
||||
|
||||
// VerifyFiles verifies that all package files have neen correctly downloaded
|
||||
func (p *Package) VerifyFiles(packageRepo *Repository) (result bool, err error) {
|
||||
result = true
|
||||
|
||||
for _, f := range p.Files {
|
||||
result, err = f.Verify(packageRepo)
|
||||
if err != nil || !result {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// PackageCollection does management of packages in DB
|
||||
type PackageCollection struct {
|
||||
db database.Storage
|
||||
|
||||
Reference in New Issue
Block a user