Add config option 'downloadSourcePackages'.

This commit is contained in:
Andrey Smirnov
2014-02-14 23:44:46 +04:00
parent e6a2f27d47
commit 36446e46a1
2 changed files with 20 additions and 17 deletions

View File

@@ -8,26 +8,28 @@ import (
// ConfigStructure is structure of main configuration
type ConfigStructure struct {
RootDir string `json:"rootDir"`
DownloadConcurrency int `json:"downloadConcurrency"`
Architectures []string `json:"architectures"`
DepFollowSuggests bool `json:"dependencyFollowSuggests"`
DepFollowRecommends bool `json:"dependencyFollowRecommends"`
DepFollowAllVariants bool `json:"dependencyFollowAllVariants"`
GpgDisableSign bool `json:"gpgDisableSign"`
GpgDisableVerify bool `json:"gpgDisableVerify"`
RootDir string `json:"rootDir"`
DownloadConcurrency int `json:"downloadConcurrency"`
Architectures []string `json:"architectures"`
DepFollowSuggests bool `json:"dependencyFollowSuggests"`
DepFollowRecommends bool `json:"dependencyFollowRecommends"`
DepFollowAllVariants bool `json:"dependencyFollowAllVariants"`
GpgDisableSign bool `json:"gpgDisableSign"`
GpgDisableVerify bool `json:"gpgDisableVerify"`
DownloadSourcePackages bool `json:"downloadSourcePackages"`
}
// Config is configuration for aptly, shared by all modules
var Config = ConfigStructure{
RootDir: filepath.Join(os.Getenv("HOME"), ".aptly"),
DownloadConcurrency: 4,
Architectures: []string{},
DepFollowSuggests: false,
DepFollowRecommends: false,
DepFollowAllVariants: false,
GpgDisableSign: false,
GpgDisableVerify: false,
RootDir: filepath.Join(os.Getenv("HOME"), ".aptly"),
DownloadConcurrency: 4,
Architectures: []string{},
DepFollowSuggests: false,
DepFollowRecommends: false,
DepFollowAllVariants: false,
GpgDisableSign: false,
GpgDisableVerify: false,
DownloadSourcePackages: false,
}
// LoadConfig loads configuration from json file

View File

@@ -49,7 +49,8 @@ func (s *ConfigSuite) TestSaveConfig(c *C) {
" \"dependencyFollowRecommends\": false,\n"+
" \"dependencyFollowAllVariants\": false,\n"+
" \"gpgDisableSign\": false,\n"+
" \"gpgDisableVerify\": false\n"+
" \"gpgDisableVerify\": false,\n"+
" \"downloadSourcePackages\": false\n"+
"}")
}