Add central place to create all collections from.

This commit is contained in:
Andrey Smirnov
2014-03-18 18:58:09 +04:00
parent 2315c00ae1
commit 1189bca5a4
2 changed files with 68 additions and 0 deletions
+3
View File
@@ -25,6 +25,7 @@ var context struct {
database database.Storage
packagePool aptly.PackagePool
publishedStorage aptly.PublishedStorage
collectionFactory *debian.CollectionFactory
dependencyOptions int
architecturesList []string
// Debug features
@@ -67,6 +68,8 @@ func InitContext(cmd *commander.Command) error {
return fmt.Errorf("can't open database: %s", err)
}
context.collectionFactory = debian.NewCollectionFactory(context.database)
context.packagePool = files.NewPackagePool(utils.Config.RootDir)
context.publishedStorage = files.NewPublishedStorage(utils.Config.RootDir)