Allow changing "download sources" option for the mirror. #109

This commit is contained in:
Andrey Smirnov
2014-09-22 19:36:48 +04:00
parent 5e1bd0ff0e
commit fa786332de
5 changed files with 11 additions and 5 deletions
+3
View File
@@ -25,6 +25,8 @@ func aptlyMirrorEdit(cmd *commander.Command, args []string) error {
repo.Filter = flag.Value.String() repo.Filter = flag.Value.String()
case "filter-with-deps": case "filter-with-deps":
repo.FilterWithDeps = flag.Value.Get().(bool) repo.FilterWithDeps = flag.Value.Get().(bool)
case "with-sources":
repo.DownloadSources = flag.Value.Get().(bool)
} }
}) })
@@ -71,6 +73,7 @@ Example:
cmd.Flag.String("filter", "", "filter packages in mirror") cmd.Flag.String("filter", "", "filter packages in mirror")
cmd.Flag.Bool("filter-with-deps", false, "when filtering, include dependencies of matching packages as well") cmd.Flag.Bool("filter-with-deps", false, "when filtering, include dependencies of matching packages as well")
cmd.Flag.Bool("with-sources", false, "download source packages in addition to binary packages")
return cmd return cmd
} }
+4
View File
@@ -434,6 +434,10 @@ filter packages in mirror
\-\fBfilter\-with\-deps\fR=false \-\fBfilter\-with\-deps\fR=false
when filtering, include dependencies of matching packages as well when filtering, include dependencies of matching packages as well
. .
.TP
\-\fBwith\-sources\fR=false
download source packages in addition to binary packages
.
.SH "SEARCH MIRROR FOR PACKAGES MATCHING QUERY" .SH "SEARCH MIRROR FOR PACKAGES MATCHING QUERY"
\fBaptly\fR \fBmirror\fR \fBsearch\fR \fIname\fR \fIpackage\-query\fR \fBaptly\fR \fBmirror\fR \fBsearch\fR \fIname\fR \fIpackage\-query\fR
. .
+1 -1
View File
@@ -1 +1 @@
Mirror [wheezy-main]: http://mirror.yandex.ru/debian/ wheezy successfully updated. Mirror [wheezy-main]: http://mirror.yandex.ru/debian/ wheezy [src] successfully updated.
@@ -3,10 +3,9 @@ Archive Root URL: http://mirror.yandex.ru/debian/
Distribution: wheezy Distribution: wheezy
Components: main Components: main
Architectures: i386, amd64 Architectures: i386, amd64
Download Sources: no Download Sources: yes
Filter: nginx Filter: nginx
Filter With Deps: yes Filter With Deps: yes
Last update: 2014-06-28 01:23:25 MSK
Number of packages: 56121 Number of packages: 56121
Information from release file: Information from release file:
+2 -2
View File
@@ -4,10 +4,10 @@ from lib import BaseTest
class EditMirror1Test(BaseTest): class EditMirror1Test(BaseTest):
""" """
edit mirror: enable filter edit mirror: enable filter & download sources
""" """
fixtureDB = True fixtureDB = True
runCmd = "aptly mirror edit -filter=nginx -filter-with-deps wheezy-main" runCmd = "aptly mirror edit -filter=nginx -filter-with-deps -with-sources wheezy-main"
def check(self): def check(self):
self.check_output() self.check_output()