mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-04-20 19:38:39 +00:00
add default aptly config files
config rfiles are read in the following order: 1) ~/.aptly.conf 2) /usr/local/etc/aptly.conf 3) /etc/aptly.conf
This commit is contained in:
@@ -96,12 +96,11 @@ func (context *AptlyContext) config() *utils.ConfigStructure {
|
||||
Fatal(err)
|
||||
}
|
||||
} else {
|
||||
configLocations := []string{
|
||||
filepath.Join(os.Getenv("HOME"), ".aptly.conf"),
|
||||
"/etc/aptly.conf",
|
||||
}
|
||||
homeLocation := filepath.Join(os.Getenv("HOME"), ".aptly.conf")
|
||||
configLocations := []string{ homeLocation, "/etc/aptly.conf", }
|
||||
|
||||
for _, configLocation := range configLocations {
|
||||
// FIXME: check if exists, check if readable
|
||||
err = utils.LoadConfig(configLocation, &utils.Config)
|
||||
if err == nil {
|
||||
break
|
||||
@@ -112,7 +111,7 @@ 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])
|
||||
fmt.Fprintf(os.Stderr, "Config file not found, creating default config at %s\n\n", homeLocation)
|
||||
|
||||
// as this is fresh aptly installation, we don't need to support legacy pool locations
|
||||
utils.Config.SkipLegacyPool = true
|
||||
|
||||
@@ -12,7 +12,7 @@ package environment to new version.
|
||||
|
||||
Options:
|
||||
-architectures="": list of architectures to consider during (comma-separated), default to all available
|
||||
-config="": location of configuration file (default locations are /etc/aptly.conf, ~/.aptly.conf)
|
||||
-config="": location of configuration file (default locations in order: ~/.aptly.conf, /usr/local/etc/aptly.conf, /etc/aptly.conf)
|
||||
-db-open-attempts=10: number of attempts to open DB if it's locked by other instance
|
||||
-dep-follow-all-variants: when processing dependencies, follow a & b if dependency is 'a|b'
|
||||
-dep-follow-recommends: when processing dependencies, follow Recommends
|
||||
|
||||
@@ -20,7 +20,7 @@ Use "aptly help <command>" for more information about a command.
|
||||
|
||||
Options:
|
||||
-architectures="": list of architectures to consider during (comma-separated), default to all available
|
||||
-config="": location of configuration file (default locations are /etc/aptly.conf, ~/.aptly.conf)
|
||||
-config="": location of configuration file (default locations in order: ~/.aptly.conf, /usr/local/etc/aptly.conf, /etc/aptly.conf)
|
||||
-db-open-attempts=10: number of attempts to open DB if it's locked by other instance
|
||||
-dep-follow-all-variants: when processing dependencies, follow a & b if dependency is 'a|b'
|
||||
-dep-follow-recommends: when processing dependencies, follow Recommends
|
||||
|
||||
@@ -14,7 +14,7 @@ Example:
|
||||
|
||||
Options:
|
||||
-architectures="": list of architectures to consider during (comma-separated), default to all available
|
||||
-config="": location of configuration file (default locations are /etc/aptly.conf, ~/.aptly.conf)
|
||||
-config="": location of configuration file (default locations in order: ~/.aptly.conf, /usr/local/etc/aptly.conf, /etc/aptly.conf)
|
||||
-db-open-attempts=10: number of attempts to open DB if it's locked by other instance
|
||||
-dep-follow-all-variants: when processing dependencies, follow a & b if dependency is 'a|b'
|
||||
-dep-follow-recommends: when processing dependencies, follow Recommends
|
||||
|
||||
@@ -5,7 +5,7 @@ aptly mirror create - create new mirror
|
||||
|
||||
Options:
|
||||
-architectures="": list of architectures to consider during (comma-separated), default to all available
|
||||
-config="": location of configuration file (default locations are /etc/aptly.conf, ~/.aptly.conf)
|
||||
-config="": location of configuration file (default locations in order: ~/.aptly.conf, /usr/local/etc/aptly.conf, /etc/aptly.conf)
|
||||
-db-open-attempts=10: number of attempts to open DB if it's locked by other instance
|
||||
-dep-follow-all-variants: when processing dependencies, follow a & b if dependency is 'a|b'
|
||||
-dep-follow-recommends: when processing dependencies, follow Recommends
|
||||
|
||||
@@ -16,7 +16,7 @@ Use "mirror help <command>" for more information about a command.
|
||||
|
||||
Options:
|
||||
-architectures="": list of architectures to consider during (comma-separated), default to all available
|
||||
-config="": location of configuration file (default locations are /etc/aptly.conf, ~/.aptly.conf)
|
||||
-config="": location of configuration file (default locations in order: ~/.aptly.conf, /usr/local/etc/aptly.conf, /etc/aptly.conf)
|
||||
-db-open-attempts=10: number of attempts to open DB if it's locked by other instance
|
||||
-dep-follow-all-variants: when processing dependencies, follow a & b if dependency is 'a|b'
|
||||
-dep-follow-recommends: when processing dependencies, follow Recommends
|
||||
|
||||
@@ -16,7 +16,7 @@ Use "mirror help <command>" for more information about a command.
|
||||
|
||||
Options:
|
||||
-architectures="": list of architectures to consider during (comma-separated), default to all available
|
||||
-config="": location of configuration file (default locations are /etc/aptly.conf, ~/.aptly.conf)
|
||||
-config="": location of configuration file (default locations in order: ~/.aptly.conf, /usr/local/etc/aptly.conf, /etc/aptly.conf)
|
||||
-db-open-attempts=10: number of attempts to open DB if it's locked by other instance
|
||||
-dep-follow-all-variants: when processing dependencies, follow a & b if dependency is 'a|b'
|
||||
-dep-follow-recommends: when processing dependencies, follow Recommends
|
||||
|
||||
@@ -6,7 +6,7 @@ aptly mirror create - create new mirror
|
||||
|
||||
Options:
|
||||
-architectures="": list of architectures to consider during (comma-separated), default to all available
|
||||
-config="": location of configuration file (default locations are /etc/aptly.conf, ~/.aptly.conf)
|
||||
-config="": location of configuration file (default locations in order: ~/.aptly.conf, /usr/local/etc/aptly.conf, /etc/aptly.conf)
|
||||
-db-open-attempts=10: number of attempts to open DB if it's locked by other instance
|
||||
-dep-follow-all-variants: when processing dependencies, follow a & b if dependency is 'a|b'
|
||||
-dep-follow-recommends: when processing dependencies, follow Recommends
|
||||
|
||||
Reference in New Issue
Block a user