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

View File

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