diff --git a/cmd/mirror_edit.go b/cmd/mirror_edit.go index 513c65e8..e331e2a7 100644 --- a/cmd/mirror_edit.go +++ b/cmd/mirror_edit.go @@ -25,6 +25,8 @@ func aptlyMirrorEdit(cmd *commander.Command, args []string) error { repo.Filter = flag.Value.String() case "filter-with-deps": 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.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 } diff --git a/man/aptly.1 b/man/aptly.1 index 10dea3d3..4302fa15 100644 --- a/man/aptly.1 +++ b/man/aptly.1 @@ -434,6 +434,10 @@ filter packages in mirror \-\fBfilter\-with\-deps\fR=false 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" \fBaptly\fR \fBmirror\fR \fBsearch\fR \fIname\fR \fIpackage\-query\fR . diff --git a/system/t04_mirror/EditMirror1Test_gold b/system/t04_mirror/EditMirror1Test_gold index 359dc7ac..7882ef07 100644 --- a/system/t04_mirror/EditMirror1Test_gold +++ b/system/t04_mirror/EditMirror1Test_gold @@ -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. diff --git a/system/t04_mirror/EditMirror1Test_mirror_show b/system/t04_mirror/EditMirror1Test_mirror_show index 0090012c..a0bffd09 100644 --- a/system/t04_mirror/EditMirror1Test_mirror_show +++ b/system/t04_mirror/EditMirror1Test_mirror_show @@ -3,10 +3,9 @@ Archive Root URL: http://mirror.yandex.ru/debian/ Distribution: wheezy Components: main Architectures: i386, amd64 -Download Sources: no +Download Sources: yes Filter: nginx Filter With Deps: yes -Last update: 2014-06-28 01:23:25 MSK Number of packages: 56121 Information from release file: diff --git a/system/t04_mirror/edit.py b/system/t04_mirror/edit.py index f6778819..968535af 100644 --- a/system/t04_mirror/edit.py +++ b/system/t04_mirror/edit.py @@ -4,10 +4,10 @@ from lib import BaseTest class EditMirror1Test(BaseTest): """ - edit mirror: enable filter + edit mirror: enable filter & download sources """ 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): self.check_output()