mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-01-11 03:11:50 +00:00
Allow changing "download sources" option for the mirror. #109
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
.
|
||||
|
||||
@@ -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
|
||||
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:
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user