Add support for custom package pool locations

Signed-off-by: Ryan Gonzalez <ryan.gonzalez@collabora.com>
This commit is contained in:
Ryan Gonzalez
2022-04-28 16:14:34 -05:00
committed by André Roth
parent 91574b53d9
commit 8e37813129
7 changed files with 29 additions and 4 deletions

View File

@@ -361,7 +361,12 @@ func (context *AptlyContext) PackagePool() aptly.PackagePool {
defer context.Unlock()
if context.packagePool == nil {
context.packagePool = files.NewPackagePool(context.config().RootDir, !context.config().SkipLegacyPool)
poolRoot := context.config().PackagePoolStorage.Path
if poolRoot == "" {
poolRoot = filepath.Join(context.config().RootDir, "pool")
}
context.packagePool = files.NewPackagePool(poolRoot, !context.config().SkipLegacyPool)
}
return context.packagePool