Refactoring: use CollectionFactory instead of manual collection creation.

This commit is contained in:
Andrey Smirnov
2014-03-25 14:59:26 +04:00
parent a0497058ee
commit 1a60ac6aa0
24 changed files with 101 additions and 165 deletions
+2 -2
View File
@@ -315,7 +315,7 @@ ok:
}
// Download downloads all repo files
func (repo *RemoteRepo) Download(progress aptly.Progress, d aptly.Downloader, packageCollection *PackageCollection, packagePool aptly.PackagePool, ignoreMismatch bool) error {
func (repo *RemoteRepo) Download(progress aptly.Progress, d aptly.Downloader, collectionFactory *CollectionFactory, packagePool aptly.PackagePool, ignoreMismatch bool) error {
list := NewPackageList()
progress.Printf("Downloading & parsing package files...\n")
@@ -379,7 +379,7 @@ func (repo *RemoteRepo) Download(progress aptly.Progress, d aptly.Downloader, pa
return err
}
err = packageCollection.Update(p)
err = collectionFactory.PackageCollection().Update(p)
if err != nil {
return err
}