mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-06-04 05:10:40 +00:00
Add flag to disable/enable support for legacy pool paths
Legacy pool paths are enabled by default, but for new aptly installations (when aptly config is first generated), it would be disabled explicitly.
This commit is contained in:
+4
-1
@@ -101,6 +101,9 @@ func (context *AptlyContext) config() *utils.ConfigStructure {
|
||||
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Config file not found, creating default config at %s\n\n", configLocations[0])
|
||||
|
||||
// as this is fresh aptly installation, we don't need to support legacy pool locations
|
||||
utils.Config.SkipLegacyPool = true
|
||||
utils.SaveConfig(configLocations[0], &utils.Config)
|
||||
}
|
||||
}
|
||||
@@ -302,7 +305,7 @@ func (context *AptlyContext) PackagePool() aptly.PackagePool {
|
||||
defer context.Unlock()
|
||||
|
||||
if context.packagePool == nil {
|
||||
context.packagePool = files.NewPackagePool(context.config().RootDir)
|
||||
context.packagePool = files.NewPackagePool(context.config().RootDir, !context.config().SkipLegacyPool)
|
||||
}
|
||||
|
||||
return context.packagePool
|
||||
|
||||
Reference in New Issue
Block a user