Added option --skip-existing-packages to speed up mirror update.

This commit is contained in:
Clemens Rabe
2017-03-23 21:55:22 +01:00
parent 52f7c83f95
commit 66f51d2b17
8 changed files with 405 additions and 105 deletions
+1
View File
@@ -22,3 +22,4 @@ List of contributors, in chronological order:
* Phil Frost (https://github.com/bitglue) * Phil Frost (https://github.com/bitglue)
* Benoit Foucher (https://github.com/bentoi) * Benoit Foucher (https://github.com/bentoi)
* Geoffrey Thomas (https://github.com/geofft) * Geoffrey Thomas (https://github.com/geofft)
* Clemens Rabe (https://github.com/seeraven)
+4 -1
View File
@@ -79,8 +79,10 @@ func aptlyMirrorUpdate(cmd *commander.Command, args []string) error {
queue []deb.PackageDownloadTask queue []deb.PackageDownloadTask
) )
skip_existing_packages := context.Flags().Lookup("skip-existing-packages").Value.Get().(bool)
context.Progress().Printf("Building download queue...\n") context.Progress().Printf("Building download queue...\n")
queue, downloadSize, err = repo.BuildDownloadQueue(context.PackagePool()) queue, downloadSize, err = repo.BuildDownloadQueue(context.PackagePool(), skip_existing_packages)
if err != nil { if err != nil {
return fmt.Errorf("unable to update: %s", err) return fmt.Errorf("unable to update: %s", err)
} }
@@ -186,6 +188,7 @@ Example:
cmd.Flag.Bool("force", false, "force update mirror even if it is locked by another process") cmd.Flag.Bool("force", false, "force update mirror even if it is locked by another process")
cmd.Flag.Bool("ignore-checksums", false, "ignore checksum mismatches while downloading package files and metadata") cmd.Flag.Bool("ignore-checksums", false, "ignore checksum mismatches while downloading package files and metadata")
cmd.Flag.Bool("ignore-signatures", false, "disable verification of Release file signatures") cmd.Flag.Bool("ignore-signatures", false, "disable verification of Release file signatures")
cmd.Flag.Bool("skip-existing-packages", false, "do not check file existance for packages listed in the internal database of the mirror")
cmd.Flag.Int64("download-limit", 0, "limit download speed (kbytes/sec)") cmd.Flag.Int64("download-limit", 0, "limit download speed (kbytes/sec)")
cmd.Flag.Var(&keyRingsFlag{}, "keyring", "gpg keyring to use when verifying Release file (could be specified multiple times)") cmd.Flag.Var(&keyRingsFlag{}, "keyring", "gpg keyring to use when verifying Release file (could be specified multiple times)")
+19 -13
View File
@@ -503,27 +503,33 @@ func (repo *RemoteRepo) ApplyFilter(dependencyOptions int, filterQuery PackageQu
} }
// BuildDownloadQueue builds queue, discards current PackageList // BuildDownloadQueue builds queue, discards current PackageList
func (repo *RemoteRepo) BuildDownloadQueue(packagePool aptly.PackagePool) (queue []PackageDownloadTask, downloadSize int64, err error) { func (repo *RemoteRepo) BuildDownloadQueue(packagePool aptly.PackagePool, skip_existing_packages bool) (queue []PackageDownloadTask, downloadSize int64, err error) {
queue = make([]PackageDownloadTask, 0, repo.packageList.Len()) queue = make([]PackageDownloadTask, 0, repo.packageList.Len())
seen := make(map[string]struct{}, repo.packageList.Len()) seen := make(map[string]struct{}, repo.packageList.Len())
err = repo.packageList.ForEach(func(p *Package) error { err = repo.packageList.ForEach(func(p *Package) error {
list, err2 := p.DownloadList(packagePool) download := true
if err2 != nil { if repo.packageRefs != nil && skip_existing_packages {
return err2 download = ! repo.packageRefs.Has(p)
} }
p.files = nil
for _, task := range list { if download {
key := task.RepoURI + "-" + task.DestinationPath list, err2 := p.DownloadList(packagePool)
_, found := seen[key] if err2 != nil {
if !found { return err2
queue = append(queue, task) }
downloadSize += task.Checksums.Size p.files = nil
seen[key] = struct{}{}
for _, task := range list {
key := task.RepoURI + "-" + task.DestinationPath
_, found := seen[key]
if !found {
queue = append(queue, task)
downloadSize += task.Checksums.Size
seen[key] = struct{}{}
}
} }
} }
return nil return nil
}) })
if err != nil { if err != nil {
+180 -4
View File
@@ -265,7 +265,7 @@ func (s *RemoteRepoSuite) TestDownload(c *C) {
c.Assert(err, IsNil) c.Assert(err, IsNil)
c.Assert(s.downloader.Empty(), Equals, true) c.Assert(s.downloader.Empty(), Equals, true)
queue, size, err := s.repo.BuildDownloadQueue(s.packagePool) queue, size, err := s.repo.BuildDownloadQueue(s.packagePool, false)
c.Check(size, Equals, int64(3)) c.Check(size, Equals, int64(3))
c.Check(queue, HasLen, 1) c.Check(queue, HasLen, 1)
c.Check(queue[0].RepoURI, Equals, "pool/main/a/amanda/amanda-client_3.3.1-3~bpo60+1_amd64.deb") c.Check(queue[0].RepoURI, Equals, "pool/main/a/amanda/amanda-client_3.3.1-3~bpo60+1_amd64.deb")
@@ -277,6 +277,47 @@ func (s *RemoteRepoSuite) TestDownload(c *C) {
c.Assert(err, IsNil) c.Assert(err, IsNil)
c.Check(pkg.Name, Equals, "amanda-client") c.Check(pkg.Name, Equals, "amanda-client")
// Next call must return an empty download list with option "skip-existing-packages"
s.downloader.ExpectResponse("http://mirror.yandex.ru/debian/dists/squeeze/Release", exampleReleaseFile)
err = s.repo.Fetch(s.downloader, nil)
c.Assert(err, IsNil)
s.downloader.ExpectError("http://mirror.yandex.ru/debian/dists/squeeze/main/binary-i386/Packages.bz2", &http.HTTPError{Code: 404})
s.downloader.ExpectError("http://mirror.yandex.ru/debian/dists/squeeze/main/binary-i386/Packages.gz", &http.HTTPError{Code: 404})
s.downloader.ExpectResponse("http://mirror.yandex.ru/debian/dists/squeeze/main/binary-i386/Packages", examplePackagesFile)
err = s.repo.DownloadPackageIndexes(s.progress, s.downloader, s.collectionFactory, false)
c.Assert(err, IsNil)
c.Assert(s.downloader.Empty(), Equals, true)
queue, size, err = s.repo.BuildDownloadQueue(s.packagePool, true)
c.Check(size, Equals, int64(0))
c.Check(queue, HasLen, 0)
s.repo.FinalizeDownload()
c.Assert(s.repo.packageRefs, NotNil)
// Next call must return the download list without option "skip-existing-packages"
s.downloader.ExpectResponse("http://mirror.yandex.ru/debian/dists/squeeze/Release", exampleReleaseFile)
err = s.repo.Fetch(s.downloader, nil)
c.Assert(err, IsNil)
s.downloader.ExpectError("http://mirror.yandex.ru/debian/dists/squeeze/main/binary-i386/Packages.bz2", &http.HTTPError{Code: 404})
s.downloader.ExpectError("http://mirror.yandex.ru/debian/dists/squeeze/main/binary-i386/Packages.gz", &http.HTTPError{Code: 404})
s.downloader.ExpectResponse("http://mirror.yandex.ru/debian/dists/squeeze/main/binary-i386/Packages", examplePackagesFile)
err = s.repo.DownloadPackageIndexes(s.progress, s.downloader, s.collectionFactory, false)
c.Assert(err, IsNil)
c.Assert(s.downloader.Empty(), Equals, true)
queue, size, err = s.repo.BuildDownloadQueue(s.packagePool, false)
c.Check(size, Equals, int64(3))
c.Check(queue, HasLen, 1)
c.Check(queue[0].RepoURI, Equals, "pool/main/a/amanda/amanda-client_3.3.1-3~bpo60+1_amd64.deb")
s.repo.FinalizeDownload()
c.Assert(s.repo.packageRefs, NotNil)
} }
func (s *RemoteRepoSuite) TestDownloadWithSources(c *C) { func (s *RemoteRepoSuite) TestDownloadWithSources(c *C) {
@@ -297,7 +338,7 @@ func (s *RemoteRepoSuite) TestDownloadWithSources(c *C) {
c.Assert(err, IsNil) c.Assert(err, IsNil)
c.Assert(s.downloader.Empty(), Equals, true) c.Assert(s.downloader.Empty(), Equals, true)
queue, size, err := s.repo.BuildDownloadQueue(s.packagePool) queue, size, err := s.repo.BuildDownloadQueue(s.packagePool, false)
c.Check(size, Equals, int64(15)) c.Check(size, Equals, int64(15))
c.Check(queue, HasLen, 4) c.Check(queue, HasLen, 4)
@@ -322,6 +363,54 @@ func (s *RemoteRepoSuite) TestDownloadWithSources(c *C) {
pkg, err = s.collectionFactory.PackageCollection().ByKey(s.repo.packageRefs.Refs[1]) pkg, err = s.collectionFactory.PackageCollection().ByKey(s.repo.packageRefs.Refs[1])
c.Assert(err, IsNil) c.Assert(err, IsNil)
c.Check(pkg.Name, Equals, "access-modifier-checker") c.Check(pkg.Name, Equals, "access-modifier-checker")
// Next call must return an empty download list with option "skip-existing-packages"
s.downloader.ExpectResponse("http://mirror.yandex.ru/debian/dists/squeeze/Release", exampleReleaseFile)
err = s.repo.Fetch(s.downloader, nil)
c.Assert(err, IsNil)
s.downloader.ExpectError("http://mirror.yandex.ru/debian/dists/squeeze/main/binary-i386/Packages.bz2", &http.HTTPError{Code: 404})
s.downloader.ExpectError("http://mirror.yandex.ru/debian/dists/squeeze/main/binary-i386/Packages.gz", &http.HTTPError{Code: 404})
s.downloader.ExpectResponse("http://mirror.yandex.ru/debian/dists/squeeze/main/binary-i386/Packages", examplePackagesFile)
s.downloader.ExpectError("http://mirror.yandex.ru/debian/dists/squeeze/main/source/Sources.bz2", &http.HTTPError{Code: 404})
s.downloader.ExpectError("http://mirror.yandex.ru/debian/dists/squeeze/main/source/Sources.gz", &http.HTTPError{Code: 404})
s.downloader.ExpectResponse("http://mirror.yandex.ru/debian/dists/squeeze/main/source/Sources", exampleSourcesFile)
err = s.repo.DownloadPackageIndexes(s.progress, s.downloader, s.collectionFactory, false)
c.Assert(err, IsNil)
c.Assert(s.downloader.Empty(), Equals, true)
queue, size, err = s.repo.BuildDownloadQueue(s.packagePool, true)
c.Check(size, Equals, int64(0))
c.Check(queue, HasLen, 0)
s.repo.FinalizeDownload()
c.Assert(s.repo.packageRefs, NotNil)
// Next call must return the download list without option "skip-existing-packages"
s.downloader.ExpectResponse("http://mirror.yandex.ru/debian/dists/squeeze/Release", exampleReleaseFile)
err = s.repo.Fetch(s.downloader, nil)
c.Assert(err, IsNil)
s.downloader.ExpectError("http://mirror.yandex.ru/debian/dists/squeeze/main/binary-i386/Packages.bz2", &http.HTTPError{Code: 404})
s.downloader.ExpectError("http://mirror.yandex.ru/debian/dists/squeeze/main/binary-i386/Packages.gz", &http.HTTPError{Code: 404})
s.downloader.ExpectResponse("http://mirror.yandex.ru/debian/dists/squeeze/main/binary-i386/Packages", examplePackagesFile)
s.downloader.ExpectError("http://mirror.yandex.ru/debian/dists/squeeze/main/source/Sources.bz2", &http.HTTPError{Code: 404})
s.downloader.ExpectError("http://mirror.yandex.ru/debian/dists/squeeze/main/source/Sources.gz", &http.HTTPError{Code: 404})
s.downloader.ExpectResponse("http://mirror.yandex.ru/debian/dists/squeeze/main/source/Sources", exampleSourcesFile)
err = s.repo.DownloadPackageIndexes(s.progress, s.downloader, s.collectionFactory, false)
c.Assert(err, IsNil)
c.Assert(s.downloader.Empty(), Equals, true)
queue, size, err = s.repo.BuildDownloadQueue(s.packagePool, false)
c.Check(size, Equals, int64(15))
c.Check(queue, HasLen, 4)
s.repo.FinalizeDownload()
c.Assert(s.repo.packageRefs, NotNil)
} }
func (s *RemoteRepoSuite) TestDownloadFlat(c *C) { func (s *RemoteRepoSuite) TestDownloadFlat(c *C) {
@@ -338,7 +427,7 @@ func (s *RemoteRepoSuite) TestDownloadFlat(c *C) {
c.Assert(err, IsNil) c.Assert(err, IsNil)
c.Assert(downloader.Empty(), Equals, true) c.Assert(downloader.Empty(), Equals, true)
queue, size, err := s.flat.BuildDownloadQueue(s.packagePool) queue, size, err := s.flat.BuildDownloadQueue(s.packagePool, false)
c.Check(size, Equals, int64(3)) c.Check(size, Equals, int64(3))
c.Check(queue, HasLen, 1) c.Check(queue, HasLen, 1)
c.Check(queue[0].RepoURI, Equals, "pool/main/a/amanda/amanda-client_3.3.1-3~bpo60+1_amd64.deb") c.Check(queue[0].RepoURI, Equals, "pool/main/a/amanda/amanda-client_3.3.1-3~bpo60+1_amd64.deb")
@@ -350,6 +439,47 @@ func (s *RemoteRepoSuite) TestDownloadFlat(c *C) {
c.Assert(err, IsNil) c.Assert(err, IsNil)
c.Check(pkg.Name, Equals, "amanda-client") c.Check(pkg.Name, Equals, "amanda-client")
// Next call must return an empty download list with option "skip-existing-packages"
downloader.ExpectResponse("http://repos.express42.com/virool/precise/Release", exampleReleaseFile)
downloader.ExpectError("http://repos.express42.com/virool/precise/Packages.bz2", &http.HTTPError{Code: 404})
downloader.ExpectError("http://repos.express42.com/virool/precise/Packages.gz", &http.HTTPError{Code: 404})
downloader.ExpectResponse("http://repos.express42.com/virool/precise/Packages", examplePackagesFile)
err = s.flat.Fetch(downloader, nil)
c.Assert(err, IsNil)
err = s.flat.DownloadPackageIndexes(s.progress, downloader, s.collectionFactory, true)
c.Assert(err, IsNil)
c.Assert(downloader.Empty(), Equals, true)
queue, size, err = s.flat.BuildDownloadQueue(s.packagePool, true)
c.Check(size, Equals, int64(0))
c.Check(queue, HasLen, 0)
s.flat.FinalizeDownload()
c.Assert(s.flat.packageRefs, NotNil)
// Next call must return the download list without option "skip-existing-packages"
downloader.ExpectResponse("http://repos.express42.com/virool/precise/Release", exampleReleaseFile)
downloader.ExpectError("http://repos.express42.com/virool/precise/Packages.bz2", &http.HTTPError{Code: 404})
downloader.ExpectError("http://repos.express42.com/virool/precise/Packages.gz", &http.HTTPError{Code: 404})
downloader.ExpectResponse("http://repos.express42.com/virool/precise/Packages", examplePackagesFile)
err = s.flat.Fetch(downloader, nil)
c.Assert(err, IsNil)
err = s.flat.DownloadPackageIndexes(s.progress, downloader, s.collectionFactory, true)
c.Assert(err, IsNil)
c.Assert(downloader.Empty(), Equals, true)
queue, size, err = s.flat.BuildDownloadQueue(s.packagePool, false)
c.Check(size, Equals, int64(3))
c.Check(queue, HasLen, 1)
c.Check(queue[0].RepoURI, Equals, "pool/main/a/amanda/amanda-client_3.3.1-3~bpo60+1_amd64.deb")
s.flat.FinalizeDownload()
c.Assert(s.flat.packageRefs, NotNil)
} }
func (s *RemoteRepoSuite) TestDownloadWithSourcesFlat(c *C) { func (s *RemoteRepoSuite) TestDownloadWithSourcesFlat(c *C) {
@@ -371,7 +501,7 @@ func (s *RemoteRepoSuite) TestDownloadWithSourcesFlat(c *C) {
c.Assert(err, IsNil) c.Assert(err, IsNil)
c.Assert(downloader.Empty(), Equals, true) c.Assert(downloader.Empty(), Equals, true)
queue, size, err := s.flat.BuildDownloadQueue(s.packagePool) queue, size, err := s.flat.BuildDownloadQueue(s.packagePool, false)
c.Check(size, Equals, int64(15)) c.Check(size, Equals, int64(15))
c.Check(queue, HasLen, 4) c.Check(queue, HasLen, 4)
@@ -397,6 +527,52 @@ func (s *RemoteRepoSuite) TestDownloadWithSourcesFlat(c *C) {
c.Assert(err, IsNil) c.Assert(err, IsNil)
c.Check(pkg.Name, Equals, "access-modifier-checker") c.Check(pkg.Name, Equals, "access-modifier-checker")
// Next call must return an empty download list with option "skip-existing-packages"
downloader.ExpectResponse("http://repos.express42.com/virool/precise/Release", exampleReleaseFile)
downloader.ExpectError("http://repos.express42.com/virool/precise/Packages.bz2", &http.HTTPError{Code: 404})
downloader.ExpectError("http://repos.express42.com/virool/precise/Packages.gz", &http.HTTPError{Code: 404})
downloader.ExpectResponse("http://repos.express42.com/virool/precise/Packages", examplePackagesFile)
downloader.ExpectError("http://repos.express42.com/virool/precise/Sources.bz2", &http.HTTPError{Code: 404})
downloader.ExpectError("http://repos.express42.com/virool/precise/Sources.gz", &http.HTTPError{Code: 404})
downloader.ExpectResponse("http://repos.express42.com/virool/precise/Sources", exampleSourcesFile)
err = s.flat.Fetch(downloader, nil)
c.Assert(err, IsNil)
err = s.flat.DownloadPackageIndexes(s.progress, downloader, s.collectionFactory, true)
c.Assert(err, IsNil)
c.Assert(downloader.Empty(), Equals, true)
queue, size, err = s.flat.BuildDownloadQueue(s.packagePool, true)
c.Check(size, Equals, int64(0))
c.Check(queue, HasLen, 0)
s.flat.FinalizeDownload()
c.Assert(s.flat.packageRefs, NotNil)
// Next call must return the download list without option "skip-existing-packages"
downloader.ExpectResponse("http://repos.express42.com/virool/precise/Release", exampleReleaseFile)
downloader.ExpectError("http://repos.express42.com/virool/precise/Packages.bz2", &http.HTTPError{Code: 404})
downloader.ExpectError("http://repos.express42.com/virool/precise/Packages.gz", &http.HTTPError{Code: 404})
downloader.ExpectResponse("http://repos.express42.com/virool/precise/Packages", examplePackagesFile)
downloader.ExpectError("http://repos.express42.com/virool/precise/Sources.bz2", &http.HTTPError{Code: 404})
downloader.ExpectError("http://repos.express42.com/virool/precise/Sources.gz", &http.HTTPError{Code: 404})
downloader.ExpectResponse("http://repos.express42.com/virool/precise/Sources", exampleSourcesFile)
err = s.flat.Fetch(downloader, nil)
c.Assert(err, IsNil)
err = s.flat.DownloadPackageIndexes(s.progress, downloader, s.collectionFactory, true)
c.Assert(err, IsNil)
c.Assert(downloader.Empty(), Equals, true)
queue, size, err = s.flat.BuildDownloadQueue(s.packagePool, false)
c.Check(size, Equals, int64(15))
c.Check(queue, HasLen, 4)
s.flat.FinalizeDownload()
c.Assert(s.flat.packageRefs, NotNil)
} }
type RemoteRepoCollectionSuite struct { type RemoteRepoCollectionSuite struct {
+100 -87
View File
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3 .\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3
. .
.TH "APTLY" "1" "March 2016" "" "" .TH "APTLY" "1" "2017-03-23" "" ""
. .
.SH "NAME" .SH "NAME"
\fBaptly\fR \- Debian repository management tool \fBaptly\fR \- Debian repository management tool
@@ -10,7 +10,7 @@
Common command format: Common command format:
. .
.P .P
\fBaptly\fR [\fIglobal options\fR\|\.\|\.\|\.] \fIcommand\fR \fIsubcommand\fR [\fIoptions\fR\|\.\|\.\|\.] \fIarguments\fR \fBaptly\fR [\fIglobal options\fR\.\.\.] \fIcommand\fR \fIsubcommand\fR [\fIoptions\fR\.\.\.] \fIarguments\fR
. .
.P .P
aptly has integrated help that matches contents of this manual page, to get help, prepend \fBhelp\fR to command name: aptly has integrated help that matches contents of this manual page, to get help, prepend \fBhelp\fR to command name:
@@ -22,7 +22,7 @@ aptly has integrated help that matches contents of this manual page, to get help
aptly is a tool to create partial and full mirrors of remote repositories, manage local repositories, filter them, merge, upgrade individual packages, take snapshots and publish them back as Debian repositories\. aptly is a tool to create partial and full mirrors of remote repositories, manage local repositories, filter them, merge, upgrade individual packages, take snapshots and publish them back as Debian repositories\.
. .
.P .P
aptly\(cqs goal is to establish repeatability and controlled changes in a package\-centric environment\. aptly allows one to fix a set of packages in a repository, so that package installation and upgrade becomes deterministic\. At the same time aptly allows one to perform controlled, fine\-grained changes in repository contents to transition your package environment to new version\. aptly\'s goal is to establish repeatability and controlled changes in a package\-centric environment\. aptly allows one to fix a set of packages in a repository, so that package installation and upgrade becomes deterministic\. At the same time aptly allows one to perform controlled, fine\-grained changes in repository contents to transition your package environment to new version\.
. .
.SH "CONFIGURATION" .SH "CONFIGURATION"
aptly looks for configuration file first in \fB~/\.aptly\.conf\fR then in \fB/etc/aptly\.conf\fR and, if no config file found, new one is created in home directory\. If \fB\-config=\fR flag is specified, aptly would use config file at specified location\. Also aptly needs root directory for database, package and published repository storage\. If not specified, directory defaults to \fB~/\.aptly\fR, it will be created if missing\. aptly looks for configuration file first in \fB~/\.aptly\.conf\fR then in \fB/etc/aptly\.conf\fR and, if no config file found, new one is created in home directory\. If \fB\-config=\fR flag is specified, aptly would use config file at specified location\. Also aptly needs root directory for database, package and published repository storage\. If not specified, directory defaults to \fB~/\.aptly\fR, it will be created if missing\.
@@ -120,11 +120,11 @@ follow dependency from binary package to source package
. .
.TP .TP
\fBgpgDisableSign\fR \fBgpgDisableSign\fR
don\(cqt sign published repositories with gpg(1), also can be disabled on per\-repo basis using \fB\-skip\-signing\fR flag when publishing don\'t sign published repositories with gpg(1), also can be disabled on per\-repo basis using \fB\-skip\-signing\fR flag when publishing
. .
.TP .TP
\fBgpgDisableVerify\fR \fBgpgDisableVerify\fR
don\(cqt verify remote mirrors with gpg(1), also can be disabled on per\-mirror basis using \fB\-ignore\-signatures\fR flag when creating and updating mirrors don\'t verify remote mirrors with gpg(1), also can be disabled on per\-mirror basis using \fB\-ignore\-signatures\fR flag when creating and updating mirrors
. .
.TP .TP
\fBdownloadSourcePackages\fR \fBdownloadSourcePackages\fR
@@ -238,22 +238,22 @@ syntax is the same as for dependency conditions, but instead of package name fie
.P .P
Supported fields: Supported fields:
. .
.IP "\[ci]" 4 .IP "\(bu" 4
all field names from Debian package control files are supported except for \fBFilename\fR, \fBMD5sum\fR, \fBSHA1\fR, \fBSHA256\fR, \fBSize\fR, \fBFiles\fR, \fBChecksums\-SHA1\fR, \fBChecksums\-SHA256\fR\. all field names from Debian package control files are supported except for \fBFilename\fR, \fBMD5sum\fR, \fBSHA1\fR, \fBSHA256\fR, \fBSize\fR, \fBFiles\fR, \fBChecksums\-SHA1\fR, \fBChecksums\-SHA256\fR\.
. .
.IP "\[ci]" 4 .IP "\(bu" 4
\fB$Source\fR is a name of source package (for binary packages) \fB$Source\fR is a name of source package (for binary packages)
. .
.IP "\[ci]" 4 .IP "\(bu" 4
\fB$SourceVersion\fR is a version of source package \fB$SourceVersion\fR is a version of source package
. .
.IP "\[ci]" 4 .IP "\(bu" 4
\fB$Architecture\fR is \fBArchitecture\fR for binary packages and \fBsource\fR for source packages, when matching with equal (\fB=\fR) operator, package with \fBany\fR architecture matches all architectures but \fBsource\fR\. \fB$Architecture\fR is \fBArchitecture\fR for binary packages and \fBsource\fR for source packages, when matching with equal (\fB=\fR) operator, package with \fBany\fR architecture matches all architectures but \fBsource\fR\.
. .
.IP "\[ci]" 4 .IP "\(bu" 4
\fB$Version\fR has the same value as \fBVersion\fR, but comparison operators use Debian version precedence rules \fB$Version\fR has the same value as \fBVersion\fR, but comparison operators use Debian version precedence rules
. .
.IP "\[ci]" 4 .IP "\(bu" 4
\fB$PackageType\fR is \fBdeb\fR for binary packages and \fBsource\fR for source packages \fB$PackageType\fR is \fBdeb\fR for binary packages and \fBsource\fR for source packages
. .
.IP "" 0 .IP "" 0
@@ -278,7 +278,7 @@ pattern matching, like shell patterns, supported special symbols are: \fB[^]?*\f
regular expression matching, e\.g\.: \fBName (~ \.*\-dev)\fR regular expression matching, e\.g\.: \fBName (~ \.*\-dev)\fR
. .
.P .P
Simple terms could be combined into more complex queries using operators \fB,\fR (and), \fB|\fR (or) and \fB!\fR (not), parentheses \fB()\fR are used to change operator precedence\. Match value could be enclosed in single (\fB\(cq\fR) or double (\fB"\fR) quotes if required to resolve ambiguity, quotes inside quoted string should escaped with slash (\fB\e\fR)\. Simple terms could be combined into more complex queries using operators \fB,\fR (and), \fB|\fR (or) and \fB!\fR (not), parentheses \fB()\fR are used to change operator precedence\. Match value could be enclosed in single (\fB\'\fR) or double (\fB"\fR) quotes if required to resolve ambiguity, quotes inside quoted string should escaped with slash (\fB\e\fR)\.
. .
.P .P
Examples: Examples:
@@ -315,10 +315,10 @@ matches all packages that provide \fBmail\-transport\fR with name that has no su
When specified on command line, query may have to be quoted according to shell rules, so that it stays single argument: When specified on command line, query may have to be quoted according to shell rules, so that it stays single argument:
. .
.P .P
\fBaptly repo import percona stable \(cqmysql\-client (>= 3\.6)\(cq\fR \fBaptly repo import percona stable \'mysql\-client (>= 3\.6)\'\fR
. .
.SH "PACKAGE DISPLAY FORMAT" .SH "PACKAGE DISPLAY FORMAT"
Some aptly commands (\fBaptly mirror search\fR, \fBaptly package search\fR, \|\.\|\.\|\.) support \fB\-format\fR flag which allows to customize how search results are printed\. Golang templates are used to specify display format, with all package stanza fields available to template\. In addition to package stanza fields aptly provides: Some aptly commands (\fBaptly mirror search\fR, \fBaptly package search\fR, \.\.\.) support \fB\-format\fR flag which allows to customize how search results are printed\. Golang templates are used to specify display format, with all package stanza fields available to template\. In addition to package stanza fields aptly provides:
. .
.TP .TP
\fBKey\fR \fBKey\fR
@@ -330,7 +330,7 @@ hash that includes MD5 of all packages files\.
. .
.TP .TP
\fBShortKey\fR \fBShortKey\fR
package ID, which is unique in single list (mirror, repo, snapshot, \|\.\|\.\|\.), but not unique in whole aptly package collection\. package ID, which is unique in single list (mirror, repo, snapshot, \.\.\.), but not unique in whole aptly package collection\.
. .
.P .P
For example, default aptly display format could be presented with the following template: \fB{{\.Package}}_{{\.Version}}_{{\.Architecture}}\fR\. To display package name with dependencies: \fB{{\.Package}} | {{\.Depends}}\fR\. More information on Golang template syntax: http://godoc\.org/text/template For example, default aptly display format could be presented with the following template: \fB{{\.Package}}_{{\.Version}}_{{\.Architecture}}\fR\. To display package name with dependencies: \fB{{\.Package}} | {{\.Depends}}\fR\. More information on Golang template syntax: http://godoc\.org/text/template
@@ -347,7 +347,7 @@ location of configuration file (default locations are /etc/aptly\.conf, ~/\.aptl
. .
.TP .TP
\-\fBdep\-follow\-all\-variants\fR=false \-\fBdep\-follow\-all\-variants\fR=false
when processing dependencies, follow a & b if dependency is \(cqa|b\(cq when processing dependencies, follow a & b if dependency is \'a|b\'
. .
.TP .TP
\-\fBdep\-follow\-recommends\fR=false \-\fBdep\-follow\-recommends\fR=false
@@ -362,10 +362,10 @@ when processing dependencies, follow from binary to Source packages
when processing dependencies, follow Suggests when processing dependencies, follow Suggests
. .
.SH "CREATE NEW MIRROR" .SH "CREATE NEW MIRROR"
\fBaptly\fR \fBmirror\fR \fBcreate\fR \fIname\fR \fIarchive url\fR \fIdistribution\fR [\fIcomponent1\fR \|\.\|\.\|\.] \fBaptly\fR \fBmirror\fR \fBcreate\fR \fIname\fR \fIarchive url\fR \fIdistribution\fR [\fIcomponent1\fR \.\.\.]
. .
.P .P
Creates mirror \fIname\fR of remote repository, aptly supports both regular and flat Debian repositories exported via HTTP and FTP\. aptly would try download Release file from remote repository and verify its\(cq signature\. Command line format resembles apt utlitily sources\.list(5)\. Creates mirror \fIname\fR of remote repository, aptly supports both regular and flat Debian repositories exported via HTTP and FTP\. aptly would try download Release file from remote repository and verify its\' signature\. Command line format resembles apt utlitily sources\.list(5)\.
. .
.P .P
PPA urls could specified in short format: PPA urls could specified in short format:
@@ -502,6 +502,10 @@ disable verification of Release file signatures
\-\fBkeyring\fR= \-\fBkeyring\fR=
gpg keyring to use when verifying Release file (could be specified multiple times) gpg keyring to use when verifying Release file (could be specified multiple times)
. .
.TP
\-\fBskip\-existing\-packages\fR=false
do not check file existance for packages listed in the internal database of the mirror
.
.SH "RENAMES MIRROR" .SH "RENAMES MIRROR"
\fBaptly\fR \fBmirror\fR \fBrename\fR \fIold\-name\fR \fInew\-name\fR \fBaptly\fR \fBmirror\fR \fBrename\fR \fIold\-name\fR \fInew\-name\fR
. .
@@ -558,7 +562,7 @@ Example:
. .
.nf .nf
$ aptly mirror search wheezy\-main \(cq$Architecture (i386), Name (% *\-dev)\(cq $ aptly mirror search wheezy\-main \'$Architecture (i386), Name (% *\-dev)\'
. .
.fi .fi
. .
@@ -599,7 +603,7 @@ when adding package that conflicts with existing package, remove existing packag
remove files that have been imported successfully into repository remove files that have been imported successfully into repository
. .
.SH "COPY PACKAGES BETWEEN LOCAL REPOSITORIES" .SH "COPY PACKAGES BETWEEN LOCAL REPOSITORIES"
\fBaptly\fR \fBrepo\fR \fBcopy\fR \fIsrc\-name\fR \fIdst\-name\fR \fIpackage\-query\fR \fB\|\.\|\.\|\.\fR \fBaptly\fR \fBrepo\fR \fBcopy\fR \fIsrc\-name\fR \fIdst\-name\fR \fIpackage\-query\fR \fB\.\.\.\fR
. .
.P .P
Command copy copies packages matching \fIpackage\-query\fR from local repo \fIsrc\-name\fR to local repo \fIdst\-name\fR\. Command copy copies packages matching \fIpackage\-query\fR from local repo \fIsrc\-name\fR to local repo \fIdst\-name\fR\.
@@ -608,14 +612,14 @@ Command copy copies packages matching \fIpackage\-query\fR from local repo \fIsr
Example: Example:
. .
.P .P
$ aptly repo copy testing stable \(cqmyapp (=0\.1\.12)\(cq $ aptly repo copy testing stable \'myapp (=0\.1\.12)\'
. .
.P .P
Options: Options:
. .
.TP .TP
\-\fBdry\-run\fR=false \-\fBdry\-run\fR=false
don\(cqt copy, just show what would be copied don\'t copy, just show what would be copied
. .
.TP .TP
\-\fBwith\-deps\fR=false \-\fBwith\-deps\fR=false
@@ -703,7 +707,7 @@ default distribution when publishing
uploaders\.json to be used when including \.changes into this repository uploaders\.json to be used when including \.changes into this repository
. .
.SH "IMPORT PACKAGES FROM MIRROR TO LOCAL REPOSITORY" .SH "IMPORT PACKAGES FROM MIRROR TO LOCAL REPOSITORY"
\fBaptly\fR \fBrepo\fR \fBimport\fR \fIsrc\-mirror\fR \fIdst\-repo\fR \fIpackage\-query\fR \fB\|\.\|\.\|\.\fR \fBaptly\fR \fBrepo\fR \fBimport\fR \fIsrc\-mirror\fR \fIdst\-repo\fR \fIpackage\-query\fR \fB\.\.\.\fR
. .
.P .P
Command import looks up packages matching \fIpackage\-query\fR in mirror \fIsrc\-mirror\fR and copies them to local repo \fIdst\-repo\fR\. Command import looks up packages matching \fIpackage\-query\fR in mirror \fIsrc\-mirror\fR and copies them to local repo \fIdst\-repo\fR\.
@@ -719,7 +723,7 @@ Options:
. .
.TP .TP
\-\fBdry\-run\fR=false \-\fBdry\-run\fR=false
don\(cqt import, just show what would be imported don\'t import, just show what would be imported
. .
.TP .TP
\-\fBwith\-deps\fR=false \-\fBwith\-deps\fR=false
@@ -745,7 +749,7 @@ Options:
display list in machine\-readable format display list in machine\-readable format
. .
.SH "MOVE PACKAGES BETWEEN LOCAL REPOSITORIES" .SH "MOVE PACKAGES BETWEEN LOCAL REPOSITORIES"
\fBaptly\fR \fBrepo\fR \fBmove\fR \fIsrc\-name\fR \fIdst\-name\fR \fIpackage\-query\fR \fB\|\.\|\.\|\.\fR \fBaptly\fR \fBrepo\fR \fBmove\fR \fIsrc\-name\fR \fIdst\-name\fR \fIpackage\-query\fR \fB\.\.\.\fR
. .
.P .P
Command move moves packages matching \fIpackage\-query\fR from local repo \fIsrc\-name\fR to local repo \fIdst\-name\fR\. Command move moves packages matching \fIpackage\-query\fR from local repo \fIsrc\-name\fR to local repo \fIdst\-name\fR\.
@@ -754,37 +758,37 @@ Command move moves packages matching \fIpackage\-query\fR from local repo \fIsrc
Example: Example:
. .
.P .P
$ aptly repo move testing stable \(cqmyapp (=0\.1\.12)\(cq $ aptly repo move testing stable \'myapp (=0\.1\.12)\'
. .
.P .P
Options: Options:
. .
.TP .TP
\-\fBdry\-run\fR=false \-\fBdry\-run\fR=false
don\(cqt move, just show what would be moved don\'t move, just show what would be moved
. .
.TP .TP
\-\fBwith\-deps\fR=false \-\fBwith\-deps\fR=false
follow dependencies when processing package\-spec follow dependencies when processing package\-spec
. .
.SH "REMOVE PACKAGES FROM LOCAL REPOSITORY" .SH "REMOVE PACKAGES FROM LOCAL REPOSITORY"
\fBaptly\fR \fBrepo\fR \fBremove\fR \fIname\fR \fIpackage\-query\fR \fB\|\.\|\.\|\.\fR \fBaptly\fR \fBrepo\fR \fBremove\fR \fIname\fR \fIpackage\-query\fR \fB\.\.\.\fR
. .
.P .P
Commands removes packages matching \fIpackage\-query\fR from local repository \fIname\fR\. If removed packages are not referenced by other repos or snapshots, they can be removed completely (including files) by running \(cqaptly db cleanup\(cq\. Commands removes packages matching \fIpackage\-query\fR from local repository \fIname\fR\. If removed packages are not referenced by other repos or snapshots, they can be removed completely (including files) by running \'aptly db cleanup\'\.
. .
.P .P
Example: Example:
. .
.P .P
$ aptly repo remove testing \(cqmyapp (=0\.1\.12)\(cq $ aptly repo remove testing \'myapp (=0\.1\.12)\'
. .
.P .P
Options: Options:
. .
.TP .TP
\-\fBdry\-run\fR=false \-\fBdry\-run\fR=false
don\(cqt remove, just show what would be removed don\'t remove, just show what would be removed
. .
.SH "SHOW DETAILS ABOUT LOCAL REPOSITORY" .SH "SHOW DETAILS ABOUT LOCAL REPOSITORY"
\fBaptly\fR \fBrepo\fR \fBshow\fR \fIname\fR \fBaptly\fR \fBrepo\fR \fBshow\fR \fIname\fR
@@ -827,7 +831,7 @@ Example:
. .
.nf .nf
$ aptly repo search my\-software \(cq$Architecture (i386), Name (% *\-dev)\(cq $ aptly repo search my\-software \'$Architecture (i386), Name (% *\-dev)\'
. .
.fi .fi
. .
@@ -845,7 +849,7 @@ custom format for result printing
include dependencies into search results include dependencies into search results
. .
.SH "ADD PACKAGES TO LOCAL REPOSITORIES BASED ON \.CHANGES FILES" .SH "ADD PACKAGES TO LOCAL REPOSITORIES BASED ON \.CHANGES FILES"
\fBaptly\fR \fBrepo\fR \fBinclude\fR <file\.changes>|\fIdirectory\fR \fB\|\.\|\.\|\.\fR \fBaptly\fR \fBrepo\fR \fBinclude\fR <file\.changes>|\fIdirectory\fR \fB\.\.\.\fR
. .
.P .P
Command include looks for \.changes files in list of arguments or specified directories\. Each \.changes file is verified, parsed, referenced files are put into separate temporary directory and added into local repository\. Successfully imported files are removed by default\. Command include looks for \.changes files in list of arguments or specified directories\. Each \.changes file is verified, parsed, referenced files are put into separate temporary directory and added into local repository\. Successfully imported files are removed by default\.
@@ -880,7 +884,7 @@ gpg keyring to use when verifying Release file (could be specified multiple time
. .
.TP .TP
\-\fBno\-remove\-files\fR=false \-\fBno\-remove\-files\fR=false
don\(cqt remove files that have been imported successfully into repository don\'t remove files that have been imported successfully into repository
. .
.TP .TP
\-\fBrepo\fR={{\.Distribution}} \-\fBrepo\fR={{\.Distribution}}
@@ -929,7 +933,7 @@ display list in machine\-readable format
. .
.TP .TP
\-\fBsort\fR=name \-\fBsort\fR=name
display list in \(cqname\(cq or creation \(cqtime\(cq order display list in \'name\' or creation \'time\' order
. .
.SH "SHOWS DETAILS ABOUT SNAPSHOT" .SH "SHOWS DETAILS ABOUT SNAPSHOT"
\fBaptly\fR \fBsnapshot\fR \fBshow\fR \fIname\fR \fBaptly\fR \fBsnapshot\fR \fBshow\fR \fIname\fR
@@ -958,7 +962,7 @@ Options:
show list of packages show list of packages
. .
.SH "VERIFY DEPENDENCIES IN SNAPSHOT" .SH "VERIFY DEPENDENCIES IN SNAPSHOT"
\fBaptly\fR \fBsnapshot\fR \fBverify\fR \fIname\fR [\fIsource\fR \|\.\|\.\|\.] \fBaptly\fR \fBsnapshot\fR \fBverify\fR \fIname\fR [\fIsource\fR \.\.\.]
. .
.P .P
Verify does dependency resolution in snapshot \fIname\fR, possibly using additional snapshots \fIsource\fR as dependency sources\. All unsatisfied dependencies are printed\. Verify does dependency resolution in snapshot \fIname\fR, possibly using additional snapshots \fIsource\fR as dependency sources\. All unsatisfied dependencies are printed\.
@@ -977,10 +981,10 @@ $ aptly snapshot verify wheezy\-main wheezy\-contrib wheezy\-non\-free
.IP "" 0 .IP "" 0
. .
.SH "PULL PACKAGES FROM ANOTHER SNAPSHOT" .SH "PULL PACKAGES FROM ANOTHER SNAPSHOT"
\fBaptly\fR \fBsnapshot\fR \fBpull\fR \fIname\fR \fIsource\fR \fIdestination\fR \fIpackage\-query\fR \fB\|\.\|\.\|\.\fR \fBaptly\fR \fBsnapshot\fR \fBpull\fR \fIname\fR \fIsource\fR \fIdestination\fR \fIpackage\-query\fR \fB\.\.\.\fR
. .
.P .P
Command pull pulls new packages along with its\(cq dependencies to snapshot \fIname\fR from snapshot \fIsource\fR\. Pull can upgrade package version in \fIname\fR with versions from \fIsource\fR following dependencies\. New snapshot \fIdestination\fR is created as a result of this process\. Packages could be specified simply as \(cqpackage\-name\(cq or as package queries\. Command pull pulls new packages along with its\' dependencies to snapshot \fIname\fR from snapshot \fIsource\fR\. Pull can upgrade package version in \fIname\fR with versions from \fIsource\fR following dependencies\. New snapshot \fIdestination\fR is created as a result of this process\. Packages could be specified simply as \'package\-name\' or as package queries\.
. .
.P .P
Example: Example:
@@ -1004,15 +1008,15 @@ pull all the packages that satisfy the dependency version requirements
. .
.TP .TP
\-\fBdry\-run\fR=false \-\fBdry\-run\fR=false
don\(cqt create destination snapshot, just show what would be pulled don\'t create destination snapshot, just show what would be pulled
. .
.TP .TP
\-\fBno\-deps\fR=false \-\fBno\-deps\fR=false
don\(cqt process dependencies, just pull listed packages don\'t process dependencies, just pull listed packages
. .
.TP .TP
\-\fBno\-remove\fR=false \-\fBno\-remove\fR=false
don\(cqt remove other package versions when pulling package don\'t remove other package versions when pulling package
. .
.SH "DIFFERENCE BETWEEN TWO SNAPSHOTS" .SH "DIFFERENCE BETWEEN TWO SNAPSHOTS"
\fBaptly\fR \fBsnapshot\fR \fBdiff\fR \fIname\-a\fR \fIname\-b\fR \fBaptly\fR \fBsnapshot\fR \fBdiff\fR \fIname\-a\fR \fIname\-b\fR
@@ -1038,10 +1042,10 @@ Options:
. .
.TP .TP
\-\fBonly\-matching\fR=false \-\fBonly\-matching\fR=false
display diff only for matching packages (don\(cqt display missing packages) display diff only for matching packages (don\'t display missing packages)
. .
.SH "MERGES SNAPSHOTS" .SH "MERGES SNAPSHOTS"
\fBaptly\fR \fBsnapshot\fR \fBmerge\fR \fIdestination\fR \fIsource\fR [\fIsource\fR\|\.\|\.\|\.] \fBaptly\fR \fBsnapshot\fR \fBmerge\fR \fIdestination\fR \fIsource\fR [\fIsource\fR\.\.\.]
. .
.P .P
Merge command merges several \fIsource\fR snapshots into one \fIdestination\fR snapshot\. Merge happens from left to right\. By default, packages with the same name\-architecture pair are replaced during merge (package from latest snapshot on the list wins)\. If run with only one source snapshot, merge copies \fIsource\fR into \fIdestination\fR\. Merge command merges several \fIsource\fR snapshots into one \fIdestination\fR snapshot\. Merge happens from left to right\. By default, packages with the same name\-architecture pair are replaced during merge (package from latest snapshot on the list wins)\. If run with only one source snapshot, merge copies \fIsource\fR into \fIdestination\fR\.
@@ -1068,13 +1072,13 @@ use only the latest version of each package
. .
.TP .TP
\-\fBno\-remove\fR=false \-\fBno\-remove\fR=false
don\(cqt remove duplicate arch/name packages don\'t remove duplicate arch/name packages
. .
.SH "DELETE SNAPSHOT" .SH "DELETE SNAPSHOT"
\fBaptly\fR \fBsnapshot\fR \fBdrop\fR \fIname\fR \fBaptly\fR \fBsnapshot\fR \fBdrop\fR \fIname\fR
. .
.P .P
Drop removes information about a snapshot\. If snapshot is published, it can\(cqt be dropped\. Drop removes information about a snapshot\. If snapshot is published, it can\'t be dropped\.
. .
.P .P
Example: Example:
@@ -1121,7 +1125,7 @@ Example:
. .
.nf .nf
$ aptly snapshot search wheezy\-main \(cq$Architecture (i386), Name (% *\-dev)\(cq $ aptly snapshot search wheezy\-main \'$Architecture (i386), Name (% *\-dev)\'
. .
.fi .fi
. .
@@ -1139,10 +1143,10 @@ custom format for result printing
include dependencies into search results include dependencies into search results
. .
.SH "FILTER PACKAGES IN SNAPSHOT PRODUCING ANOTHER SNAPSHOT" .SH "FILTER PACKAGES IN SNAPSHOT PRODUCING ANOTHER SNAPSHOT"
\fBaptly\fR \fBsnapshot\fR \fBfilter\fR \fIsource\fR \fIdestination\fR \fIpackage\-query\fR \fB\|\.\|\.\|\.\fR \fBaptly\fR \fBsnapshot\fR \fBfilter\fR \fIsource\fR \fIdestination\fR \fIpackage\-query\fR \fB\.\.\.\fR
. .
.P .P
Command filter does filtering in snapshot \fIsource\fR, producing another snapshot \fIdestination\fR\. Packages could be specified simply as \(cqpackage\-name\(cq or as package queries\. Command filter does filtering in snapshot \fIsource\fR, producing another snapshot \fIdestination\fR\. Packages could be specified simply as \'package\-name\' or as package queries\.
. .
.P .P
Example: Example:
@@ -1151,7 +1155,7 @@ Example:
. .
.nf .nf
$ aptly snapshot filter wheezy\-main wheezy\-required \(cqPriorioty (required)\(cq $ aptly snapshot filter wheezy\-main wheezy\-required \'Priorioty (required)\'
. .
.fi .fi
. .
@@ -1300,11 +1304,11 @@ GPG secret keyring to use (instead of default)
. .
.TP .TP
\-\fBskip\-contents\fR=false \-\fBskip\-contents\fR=false
don\(cqt generate Contents indexes don\'t generate Contents indexes
. .
.TP .TP
\-\fBskip\-signing\fR=false \-\fBskip\-signing\fR=false
don\(cqt sign Release files with GPG don\'t sign Release files with GPG
. .
.SH "PUBLISH SNAPSHOT" .SH "PUBLISH SNAPSHOT"
\fBaptly\fR \fBpublish\fR \fBsnapshot\fR \fIname\fR [[\fIendpoint\fR:]\fIprefix\fR] \fBaptly\fR \fBpublish\fR \fBsnapshot\fR \fIname\fR [[\fIendpoint\fR:]\fIprefix\fR]
@@ -1387,11 +1391,11 @@ GPG secret keyring to use (instead of default)
. .
.TP .TP
\-\fBskip\-contents\fR=false \-\fBskip\-contents\fR=false
don\(cqt generate Contents indexes don\'t generate Contents indexes
. .
.TP .TP
\-\fBskip\-signing\fR=false \-\fBskip\-signing\fR=false
don\(cqt sign Release files with GPG don\'t sign Release files with GPG
. .
.SH "UPDATE PUBLISHED REPOSITORY BY SWITCHING TO NEW SNAPSHOT" .SH "UPDATE PUBLISHED REPOSITORY BY SWITCHING TO NEW SNAPSHOT"
\fBaptly\fR \fBpublish\fR \fBswitch\fR \fIdistribution\fR [[\fIendpoint\fR:]\fIprefix\fR] \fInew\-snapshot\fR \fBaptly\fR \fBpublish\fR \fBswitch\fR \fIdistribution\fR [[\fIendpoint\fR:]\fIprefix\fR] \fInew\-snapshot\fR
@@ -1465,11 +1469,11 @@ GPG secret keyring to use (instead of default)
. .
.TP .TP
\-\fBskip\-contents\fR=false \-\fBskip\-contents\fR=false
don\(cqt generate Contents indexes don\'t generate Contents indexes
. .
.TP .TP
\-\fBskip\-signing\fR=false \-\fBskip\-signing\fR=false
don\(cqt sign Release files with GPG don\'t sign Release files with GPG
. .
.SH "UPDATE PUBLISHED LOCAL REPOSITORY" .SH "UPDATE PUBLISHED LOCAL REPOSITORY"
\fBaptly\fR \fBpublish\fR \fBupdate\fR \fIdistribution\fR [[\fIendpoint\fR:]\fIprefix\fR] \fBaptly\fR \fBpublish\fR \fBupdate\fR \fIdistribution\fR [[\fIendpoint\fR:]\fIprefix\fR]
@@ -1526,11 +1530,11 @@ GPG secret keyring to use (instead of default)
. .
.TP .TP
\-\fBskip\-contents\fR=false \-\fBskip\-contents\fR=false
don\(cqt generate Contents indexes don\'t generate Contents indexes
. .
.TP .TP
\-\fBskip\-signing\fR=false \-\fBskip\-signing\fR=false
don\(cqt sign Release files with GPG don\'t sign Release files with GPG
. .
.SH "SEARCH FOR PACKAGES MATCHING QUERY" .SH "SEARCH FOR PACKAGES MATCHING QUERY"
\fBaptly\fR \fBpackage\fR \fBsearch\fR \fIpackage\-query\fR \fBaptly\fR \fBpackage\fR \fBsearch\fR \fIpackage\-query\fR
@@ -1545,7 +1549,7 @@ Example:
. .
.nf .nf
$ aptly package search \(cq$Architecture (i386), Name (% *\-dev)\(cq $ aptly package search \'$Architecture (i386), Name (% *\-dev)\'
. .
.fi .fi
. .
@@ -1571,7 +1575,7 @@ Example:
. .
.nf .nf
$ aptly package show nginx\-light_1\.2\.1\-2\.2+wheezy2_i386\(cq $ aptly package show nginx\-light_1\.2\.1\-2\.2+wheezy2_i386\'
. .
.fi .fi
. .
@@ -1592,7 +1596,7 @@ display information about mirrors, snapshots and local repos referencing this pa
\fBaptly\fR \fBdb\fR \fBcleanup\fR \fBaptly\fR \fBdb\fR \fBcleanup\fR
. .
.P .P
Database cleanup removes information about unreferenced packages and removes files in the package pool that aren\(cqt used by packages anymore Database cleanup removes information about unreferenced packages and removes files in the package pool that aren\'t used by packages anymore
. .
.P .P
Example: Example:
@@ -1605,7 +1609,7 @@ Options:
. .
.TP .TP
\-\fBdry\-run\fR=false \-\fBdry\-run\fR=false
don\(cqt delete anything don\'t delete anything
. .
.TP .TP
\-\fBverbose\fR=false \-\fBverbose\fR=false
@@ -1615,7 +1619,7 @@ be verbose when loading objects/removing them
\fBaptly\fR \fBdb\fR \fBrecover\fR \fBaptly\fR \fBdb\fR \fBrecover\fR
. .
.P .P
Database recover does its\(cq best to recover the database after a crash\. It is recommended to backup the DB before running recover\. Database recover does its\' best to recover the database after a crash\. It is recommended to backup the DB before running recover\.
. .
.P .P
Example: Example:
@@ -1627,7 +1631,7 @@ $ aptly db recover
\fBaptly\fR \fBserve\fR \fBaptly\fR \fBserve\fR
. .
.P .P
Command serve starts embedded HTTP server (not suitable for real production usage) to serve contents of public/ subdirectory of aptly\(cqs root that contains published repositories\. Command serve starts embedded HTTP server (not suitable for real production usage) to serve contents of public/ subdirectory of aptly\'s root that contains published repositories\.
. .
.P .P
Example: Example:
@@ -1663,7 +1667,7 @@ host:port for HTTP listening
. .
.TP .TP
\-\fBno\-lock\fR=false \-\fBno\-lock\fR=false
don\(cqt lock the database don\'t lock the database
. .
.SH "RENDER GRAPH OF RELATIONSHIPS" .SH "RENDER GRAPH OF RELATIONSHIPS"
\fBaptly\fR \fBgraph\fR \fBaptly\fR \fBgraph\fR
@@ -1688,7 +1692,7 @@ render graph to specified format (png, svg, pdf, etc\.)
\-\fBoutput\fR= \-\fBoutput\fR=
specify output filename, default is to open result in viewer specify output filename, default is to open result in viewer
. .
.SH "SHOW CURRENT APTLY\(cqS CONFIG" .SH "SHOW CURRENT APTLY\'S CONFIG"
\fBaptly\fR \fBconfig\fR \fBshow\fR \fBaptly\fR \fBconfig\fR \fBshow\fR
. .
.P .P
@@ -1701,7 +1705,7 @@ Example:
$ aptly config show $ aptly config show
. .
.SH "RUN APTLY TASKS" .SH "RUN APTLY TASKS"
\fBaptly\fR \fBtask\fR \fBrun\fR \-filename=\fIfilename\fR \fB|\fR \fIcommand1\fR, \fIcommand2\fR, \fB\|\.\|\.\|\.\fR \fBaptly\fR \fBtask\fR \fBrun\fR \-filename=\fIfilename\fR \fB|\fR \fIcommand1\fR, \fIcommand2\fR, \fB\.\.\.\fR
. .
.P .P
Command helps organise multiple aptly commands in one single aptly task, running as single thread\. Command helps organise multiple aptly commands in one single aptly task, running as single thread\.
@@ -1731,7 +1735,7 @@ Options:
\-\fBfilename\fR= \-\fBfilename\fR=
specifies the filename that contains the commands to run specifies the filename that contains the commands to run
. .
.SH "SHOW CURRENT APTLY\(cqS CONFIG" .SH "SHOW CURRENT APTLY\'S CONFIG"
\fBaptly\fR \fBconfig\fR \fBshow\fR \fBaptly\fR \fBconfig\fR \fBshow\fR
. .
.P .P
@@ -1764,65 +1768,74 @@ command parse failure
.SH "AUTHORS" .SH "AUTHORS"
List of contributors, in chronological order: List of contributors, in chronological order:
. .
.IP "\[ci]" 4 .IP "\(bu" 4
Andrey Smirnov (https://github\.com/smira) Andrey Smirnov (https://github\.com/smira)
. .
.IP "\[ci]" 4 .IP "\(bu" 4
Sebastien Binet (https://github\.com/sbinet) Sebastien Binet (https://github\.com/sbinet)
. .
.IP "\[ci]" 4 .IP "\(bu" 4
Ryan Uber (https://github\.com/ryanuber) Ryan Uber (https://github\.com/ryanuber)
. .
.IP "\[ci]" 4 .IP "\(bu" 4
Simon Aquino (https://github\.com/queeno) Simon Aquino (https://github\.com/queeno)
. .
.IP "\[ci]" 4 .IP "\(bu" 4
Vincent Batoufflet (https://github\.com/vbatoufflet) Vincent Batoufflet (https://github\.com/vbatoufflet)
. .
.IP "\[ci]" 4 .IP "\(bu" 4
Ivan Kurnosov (https://github\.com/zerkms) Ivan Kurnosov (https://github\.com/zerkms)
. .
.IP "\[ci]" 4 .IP "\(bu" 4
Dmitrii Kashin (https://github\.com/freehck) Dmitrii Kashin (https://github\.com/freehck)
. .
.IP "\[ci]" 4 .IP "\(bu" 4
Chris Read (https://github\.com/cread) Chris Read (https://github\.com/cread)
. .
.IP "\[ci]" 4 .IP "\(bu" 4
Rohan Garg (https://github\.com/shadeslayer) Rohan Garg (https://github\.com/shadeslayer)
. .
.IP "\[ci]" 4 .IP "\(bu" 4
Russ Allbery (https://github\.com/rra) Russ Allbery (https://github\.com/rra)
. .
.IP "\[ci]" 4 .IP "\(bu" 4
Sylvain Baubeau (https://github\.com/lebauce) Sylvain Baubeau (https://github\.com/lebauce)
. .
.IP "\[ci]" 4 .IP "\(bu" 4
Andrea Bernardo Ciddio (https://github\.com/bcandrea) Andrea Bernardo Ciddio (https://github\.com/bcandrea)
. .
.IP "\[ci]" 4 .IP "\(bu" 4
Michael Koval (https://github\.com/mkoval) Michael Koval (https://github\.com/mkoval)
. .
.IP "\[ci]" 4 .IP "\(bu" 4
Alexander Guy (https://github\.com/alexanderguy) Alexander Guy (https://github\.com/alexanderguy)
. .
.IP "\[ci]" 4 .IP "\(bu" 4
Sebastien Badia (https://github\.com/sbadia) Sebastien Badia (https://github\.com/sbadia)
. .
.IP "\[ci]" 4 .IP "\(bu" 4
Szymon Sobik (https://github\.com/sobczyk) Szymon Sobik (https://github\.com/sobczyk)
. .
.IP "\[ci]" 4 .IP "\(bu" 4
Paul Krohn (https://github\.com/paul\-krohn) Paul Krohn (https://github\.com/paul\-krohn)
. .
.IP "\[ci]" 4 .IP "\(bu" 4
Vincent Bernat (https://github\.com/vincentbernat) Vincent Bernat (https://github\.com/vincentbernat)
. .
.IP "\[ci]" 4 .IP "\(bu" 4
x539 (https://github\.com/x539) x539 (https://github\.com/x539)
. .
.IP "\[ci]" 4 .IP "\(bu" 4
Phil Frost (https://github\.com/bitglue) Phil Frost (https://github\.com/bitglue)
. .
.IP "\(bu" 4
Benoit Foucher (https://github\.com/bentoi)
.
.IP "\(bu" 4
Geoffrey Thomas (https://github\.com/geofft)
.
.IP "\(bu" 4
Clemens Rabe (https://github\.com/seeraven)
.
.IP "" 0 .IP "" 0
+61
View File
@@ -0,0 +1,61 @@
Building download queue...
Download queue: 52 items (19.79 MiB)
Downloading & parsing package files...
Downloading http://repo.varnish-cache.org/debian/dists/wheezy/Release...
Downloading http://repo.varnish-cache.org/debian/dists/wheezy/varnish-3.0/binary-amd64/Packages.bz2...
Downloading http://repo.varnish-cache.org/debian/dists/wheezy/varnish-3.0/binary-i386/Packages.bz2...
Downloading http://repo.varnish-cache.org/debian/pool/varnish-3.0/v/varnish-agent/varnish-agent_1.16.0~wheezy_all.deb...
Downloading http://repo.varnish-cache.org/debian/pool/varnish-3.0/v/varnish-agent/varnish-agent_2.2.0~wheezy_amd64.deb...
Downloading http://repo.varnish-cache.org/debian/pool/varnish-3.0/v/varnish-agent/varnish-agent_2.2.0~wheezy_i386.deb...
Downloading http://repo.varnish-cache.org/debian/pool/varnish-3.0/v/varnish-agent/varnish-agent_2.2.1+nmu1~wheezy_amd64.deb...
Downloading http://repo.varnish-cache.org/debian/pool/varnish-3.0/v/varnish-agent/varnish-agent_2.2.1~wheezy_amd64.deb...
Downloading http://repo.varnish-cache.org/debian/pool/varnish-3.0/v/varnish-agent/varnish-agent_2.2.1~wheezy_i386.deb...
Downloading http://repo.varnish-cache.org/debian/pool/varnish-3.0/v/varnish-agent/varnish-agent_3.0.0~wheezy_amd64.deb...
Downloading http://repo.varnish-cache.org/debian/pool/varnish-3.0/v/varnish-agent/varnish-agent_3.0.1~wheezy_amd64.deb...
Downloading http://repo.varnish-cache.org/debian/pool/varnish-3.0/v/varnish/libvarnishapi-dev_3.0.3-1~wheezy_amd64.deb...
Downloading http://repo.varnish-cache.org/debian/pool/varnish-3.0/v/varnish/libvarnishapi-dev_3.0.3-1~wheezy_i386.deb...
Downloading http://repo.varnish-cache.org/debian/pool/varnish-3.0/v/varnish/libvarnishapi-dev_3.0.4-1~wheezy_amd64.deb...
Downloading http://repo.varnish-cache.org/debian/pool/varnish-3.0/v/varnish/libvarnishapi-dev_3.0.4-1~wheezy_i386.deb...
Downloading http://repo.varnish-cache.org/debian/pool/varnish-3.0/v/varnish/libvarnishapi-dev_3.0.5-1~wheezy_amd64.deb...
Downloading http://repo.varnish-cache.org/debian/pool/varnish-3.0/v/varnish/libvarnishapi-dev_3.0.5-1~wheezy_i386.deb...
Downloading http://repo.varnish-cache.org/debian/pool/varnish-3.0/v/varnish/libvarnishapi-dev_3.0.6-1~wheezy_amd64.deb...
Downloading http://repo.varnish-cache.org/debian/pool/varnish-3.0/v/varnish/libvarnishapi-dev_3.0.6-1~wheezy_i386.deb...
Downloading http://repo.varnish-cache.org/debian/pool/varnish-3.0/v/varnish/libvarnishapi-dev_3.0.7-1~wheezy_amd64.deb...
Downloading http://repo.varnish-cache.org/debian/pool/varnish-3.0/v/varnish/libvarnishapi-dev_3.0.7-1~wheezy_i386.deb...
Downloading http://repo.varnish-cache.org/debian/pool/varnish-3.0/v/varnish/libvarnishapi1_3.0.3-1~wheezy_amd64.deb...
Downloading http://repo.varnish-cache.org/debian/pool/varnish-3.0/v/varnish/libvarnishapi1_3.0.3-1~wheezy_i386.deb...
Downloading http://repo.varnish-cache.org/debian/pool/varnish-3.0/v/varnish/libvarnishapi1_3.0.4-1~wheezy_amd64.deb...
Downloading http://repo.varnish-cache.org/debian/pool/varnish-3.0/v/varnish/libvarnishapi1_3.0.4-1~wheezy_i386.deb...
Downloading http://repo.varnish-cache.org/debian/pool/varnish-3.0/v/varnish/libvarnishapi1_3.0.5-1~wheezy_amd64.deb...
Downloading http://repo.varnish-cache.org/debian/pool/varnish-3.0/v/varnish/libvarnishapi1_3.0.5-1~wheezy_i386.deb...
Downloading http://repo.varnish-cache.org/debian/pool/varnish-3.0/v/varnish/libvarnishapi1_3.0.6-1~wheezy_amd64.deb...
Downloading http://repo.varnish-cache.org/debian/pool/varnish-3.0/v/varnish/libvarnishapi1_3.0.6-1~wheezy_i386.deb...
Downloading http://repo.varnish-cache.org/debian/pool/varnish-3.0/v/varnish/libvarnishapi1_3.0.7-1~wheezy_amd64.deb...
Downloading http://repo.varnish-cache.org/debian/pool/varnish-3.0/v/varnish/libvarnishapi1_3.0.7-1~wheezy_i386.deb...
Downloading http://repo.varnish-cache.org/debian/pool/varnish-3.0/v/varnish/varnish-dbg_3.0.3-1~wheezy_amd64.deb...
Downloading http://repo.varnish-cache.org/debian/pool/varnish-3.0/v/varnish/varnish-dbg_3.0.3-1~wheezy_i386.deb...
Downloading http://repo.varnish-cache.org/debian/pool/varnish-3.0/v/varnish/varnish-dbg_3.0.4-1~wheezy_amd64.deb...
Downloading http://repo.varnish-cache.org/debian/pool/varnish-3.0/v/varnish/varnish-dbg_3.0.4-1~wheezy_i386.deb...
Downloading http://repo.varnish-cache.org/debian/pool/varnish-3.0/v/varnish/varnish-dbg_3.0.5-1~wheezy_amd64.deb...
Downloading http://repo.varnish-cache.org/debian/pool/varnish-3.0/v/varnish/varnish-dbg_3.0.5-1~wheezy_i386.deb...
Downloading http://repo.varnish-cache.org/debian/pool/varnish-3.0/v/varnish/varnish-dbg_3.0.6-1~wheezy_amd64.deb...
Downloading http://repo.varnish-cache.org/debian/pool/varnish-3.0/v/varnish/varnish-dbg_3.0.6-1~wheezy_i386.deb...
Downloading http://repo.varnish-cache.org/debian/pool/varnish-3.0/v/varnish/varnish-dbg_3.0.7-1~wheezy_amd64.deb...
Downloading http://repo.varnish-cache.org/debian/pool/varnish-3.0/v/varnish/varnish-dbg_3.0.7-1~wheezy_i386.deb...
Downloading http://repo.varnish-cache.org/debian/pool/varnish-3.0/v/varnish/varnish-doc_3.0.4-1~wheezy_all.deb...
Downloading http://repo.varnish-cache.org/debian/pool/varnish-3.0/v/varnish/varnish-doc_3.0.5-1~wheezy_all.deb...
Downloading http://repo.varnish-cache.org/debian/pool/varnish-3.0/v/varnish/varnish-doc_3.0.6-1~wheezy_all.deb...
Downloading http://repo.varnish-cache.org/debian/pool/varnish-3.0/v/varnish/varnish-doc_3.0.7-1~wheezy_all.deb...
Downloading http://repo.varnish-cache.org/debian/pool/varnish-3.0/v/varnish/varnish_3.0.3-1~wheezy_amd64.deb...
Downloading http://repo.varnish-cache.org/debian/pool/varnish-3.0/v/varnish/varnish_3.0.3-1~wheezy_i386.deb...
Downloading http://repo.varnish-cache.org/debian/pool/varnish-3.0/v/varnish/varnish_3.0.4-1~wheezy_amd64.deb...
Downloading http://repo.varnish-cache.org/debian/pool/varnish-3.0/v/varnish/varnish_3.0.4-1~wheezy_i386.deb...
Downloading http://repo.varnish-cache.org/debian/pool/varnish-3.0/v/varnish/varnish_3.0.5-1~wheezy_amd64.deb...
Downloading http://repo.varnish-cache.org/debian/pool/varnish-3.0/v/varnish/varnish_3.0.5-1~wheezy_i386.deb...
Downloading http://repo.varnish-cache.org/debian/pool/varnish-3.0/v/varnish/varnish_3.0.6-1~wheezy_amd64.deb...
Downloading http://repo.varnish-cache.org/debian/pool/varnish-3.0/v/varnish/varnish_3.0.6-1~wheezy_i386.deb...
Downloading http://repo.varnish-cache.org/debian/pool/varnish-3.0/v/varnish/varnish_3.0.7-1~wheezy_amd64.deb...
Downloading http://repo.varnish-cache.org/debian/pool/varnish-3.0/v/varnish/varnish_3.0.7-1~wheezy_i386.deb...
Mirror `varnish` has been successfully updated.
@@ -0,0 +1,9 @@
Building download queue...
Download queue: 0 items (0 B)
Downloading & parsing package files...
Downloading http://repo.varnish-cache.org/debian/dists/wheezy/Release...
Downloading http://repo.varnish-cache.org/debian/dists/wheezy/varnish-3.0/binary-amd64/Packages.bz2...
Downloading http://repo.varnish-cache.org/debian/dists/wheezy/varnish-3.0/binary-i386/Packages.bz2...
Mirror `varnish` has been successfully updated.
+31
View File
@@ -172,3 +172,34 @@ class UpdateMirror12Test(BaseTest):
def output_processor(self, output): def output_processor(self, output):
return "\n".join(sorted(output.split("\n"))) return "\n".join(sorted(output.split("\n")))
class UpdateMirror13Test(BaseTest):
"""
update mirrors: regular update with --skip-existing-packages option
"""
longTest = False
fixtureCmds = [
"aptly -architectures=i386,amd64 mirror create --ignore-signatures varnish http://repo.varnish-cache.org/debian/ wheezy varnish-3.0",
]
runCmd = "aptly mirror update --ignore-signatures --skip-existing-packages varnish"
def output_processor(self, output):
return "\n".join(sorted(output.split("\n")))
class UpdateMirror14Test(BaseTest):
"""
update mirrors: regular update with --skip-existing-packages option
"""
longTest = False
fixtureCmds = [
"aptly -architectures=i386,amd64 mirror create --ignore-signatures varnish http://repo.varnish-cache.org/debian/ wheezy varnish-3.0",
"aptly mirror update --ignore-signatures --skip-existing-packages varnish"
]
runCmd = "aptly mirror update --ignore-signatures --skip-existing-packages varnish"
def output_processor(self, output):
return "\n".join(sorted(output.split("\n")))